Skip to content

date: implement E and O locale modifiers#10994

Open
naoNao89 wants to merge 1 commit intouutils:mainfrom
naoNao89:date-eo-modifiers
Open

date: implement E and O locale modifiers#10994
naoNao89 wants to merge 1 commit intouutils:mainfrom
naoNao89:date-eo-modifiers

Conversation

@naoNao89
Copy link
Contributor

This adds support for POSIX locale extension modifiers:

  • E modifiers (%EY, %Ey, %EC, %EB) for alternative representations
  • O modifiers (%Od, %Om, etc.) falls back to standard numerals

Implemented via ICU integration for calendar conversions and localized month names.

Note: Full alternative numeric system support (Arabic-Indic digits, Devanagari, blabla...) is deferred to a future enhancement as it requires ICU FixedDecimalFormatter integration

Fixes #10958

This adds support for POSIX locale extension modifiers:
- E modifiers (%EY, %Ey, %EC, %EB) for alternative representations
  using ICU calendar conversions for non-Gregorian calendars
- O modifiers (%Od, %Om, etc.) - falls back to standard numerals
  (full alternative numeric system support deferred to future work)

The implementation uses ICU4X libraries for calendar conversions
and localized month names.

Also fix clippy warning in uptime.rs for numeric literal separators.

Fixes uutils#10958
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/date/date-locale-hour. tests/date/date-locale-hour is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/dd/no-allocate is now passing!
Congrats! The gnu test tests/seq/seq-epipe is now passing!

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.

date: missing modifiers E and O

1 participant

Comments