Skip to content

Conversation

@sylvestre
Copy link
Contributor

built on top of
#10457

@sylvestre sylvestre force-pushed the year-locale branch 2 times, most recently from 16a4b2d to 1684817 Compare January 24, 2026 20:19
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/date/date-ethiopia is no longer failing!
Congrats! The gnu test tests/date/date-iran is no longer failing!
Congrats! The gnu test tests/date/date-thailand is no longer failing!
Note: The gnu test tests/seq/seq-epipe is now being skipped but was previously passing.
Note: The gnu test tests/tail/tail-n0f is now being skipped but was previously passing.

@sylvestre sylvestre marked this pull request as ready for review January 24, 2026 21:37
Implements era year calculation for Buddhist, Persian Solar Hijri, and Ethiopian calendars based on locale detection. The %Y format specifier now outputs era-appropriate years while maintaining Gregorian calendar for ISO-8601 and RFC-3339 formats for interoperability.

- Add CalendarType enum with Buddhist (+543), Persian (-621/-622), Ethiopian (-7/-8) year offsets
- Implement get_era_year() with input validation and efficient calendar conversion
- Extend ICU formatting to handle %Y era year replacement with collision-safe NULL-byte placeholders
- Add comprehensive test coverage for th_TH.UTF-8, fa_IR.UTF-8, and am_ET.UTF-8 locales
- Enable i18n-datetime feature by default with icu_locale dependency
- Fix calendar conversion logic for proper year transitions at Nowruz and Ethiopian New Year
- Remove unused helper functions for cleaner codebase
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/date/date-ethiopia is no longer failing!
Congrats! The gnu test tests/date/date-iran is no longer failing!
Congrats! The gnu test tests/date/date-thailand is no longer failing!

@sylvestre sylvestre requested a review from ChrisDryden January 24, 2026 22:09
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.

1 participant