Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change format_any_calendar to format #6013

Open
sffc opened this issue Jan 16, 2025 · 2 comments
Open

Change format_any_calendar to format #6013

sffc opened this issue Jan 16, 2025 · 2 comments
Labels
C-datetime Component: datetime, calendars, time zones discuss-priority Discuss at the next ICU4X meeting S-tiny Size: Less than an hour (trivial fixes)

Comments

@sffc
Copy link
Member

sffc commented Jan 16, 2025

After seeing more examples, I think we should rename DTF::format_any_calendar to format.

  1. This is the function most people should be using, so we should give it a nicer name.
  2. The exact behavior of which calendar converts at what time is not important for getting started. This doesn't harm program correctness in general.
  3. It should be only slightly more expensive than format_same_calendar.

Note: the function has previously been called convert_and_format, but never just format.

@sffc sffc added the discuss-priority Discuss at the next ICU4X meeting label Jan 16, 2025
@sffc sffc added this to the ICU4X 2.0 ⟨P1⟩ milestone Jan 16, 2025
@sffc
Copy link
Member Author

sffc commented Jan 16, 2025

@robertbastian agrees.

@Manishearth @zbraniecki thoughts?

@Manishearth
Copy link
Member

I'm fine with this. Slight preference for the explicitness but I don't find format_any_calendar to be particularly more explicit

@sffc sffc added C-datetime Component: datetime, calendars, time zones S-tiny Size: Less than an hour (trivial fixes) labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-datetime Component: datetime, calendars, time zones discuss-priority Discuss at the next ICU4X meeting S-tiny Size: Less than an hour (trivial fixes)
Projects
None yet
Development

No branches or pull requests

2 participants