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

Rename datetime format functions and traits #5847

Merged
merged 7 commits into from
Nov 21, 2024

Conversation

sffc
Copy link
Member

@sffc sffc commented Nov 20, 2024

@sffc sffc requested review from Manishearth, zbraniecki and a team as code owners November 20, 2024 22:30
@sffc sffc requested review from markusicu and removed request for a team and zbraniecki November 20, 2024 22:30
@@ -563,7 +563,7 @@ where
datetime: &I,
) -> Result<FormattedDateTime, crate::MismatchedCalendarError>
where
I: ?Sized + IsInCalendar + AllInputMarkers<FSet>,
I: ?Sized + InCalendar + AllInputMarkers<FSet>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional: how about InSameCalendar to (a) make it more meaningful and (b) make it more parallel with InFixedCalendar?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Justification: the fully qualified names have good parallelism

  • DateTimeFormatter::format_same_calendar => InSameCalendar
  • FixedCalendarDateTimeFormatter::format => InFixedCalendar

Also, "InCalendar" is too short and could mean something else in the future.

Manishearth
Manishearth previously approved these changes Nov 21, 2024
@sffc sffc merged commit b2cc153 into unicode-org:main Nov 21, 2024
28 checks passed
@sffc sffc deleted the dt-format-functions branch November 21, 2024 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants