Skip to content

date: implement E and O locale modifiers - #10994

Draft
naoNao89 wants to merge 12 commits into
uutils:mainfrom
naoNao89:date-eo-modifiers
Draft

naoNao89 wants to merge 12 commits into
uutils:mainfrom
naoNao89:date-eo-modifiers

Conversation

@naoNao89

@naoNao89 naoNao89 commented Feb 17, 2026 •

Copy link
Copy Markdown
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

ref:

Fixes #10958

@github-actions

Copy link
Copy Markdown

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!

@sylvestre

Copy link
Copy Markdown
Contributor

hi, this one can't be merged as it is: the build or the tests fail; it needs a rebase
could you please have a look? otherwise, i will close it, thanks

@naoNao89

Copy link
Copy Markdown
Contributor Author

oke

Copilot AI balanced review requested due to automatic review settings October 19, 2026 01:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

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
@naoNao89
naoNao89 marked this pull request as draft October 19, 2026 02:06
@codspeed

codspeed Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 6.91%

⚠️ 123 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

ℹ️ 1 benchmark has no flame graph

The flamegraph could not be generated because too much time was spent in runtime internals, making the visualization not useful for performance analysis.

❌ 2 regressed benchmarks
✅ 399 untouched benchmarks
⏩ 70 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation file_tz_abbreviations 18.9 ms 20.3 ms -6.93%
❌ Simulation file_iso_dates 18.9 ms 20.4 ms -6.89%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing naoNao89:date-eo-modifiers (c5c9326) with main (6ef5fe8)2

Open in CodSpeed

Footnotes

  1. 70 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (df66079) during the generation of this report, so 6ef5fe8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/symlink (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/follow-symlink is no longer failing!

This branch has not been deployed

No deployments
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

3 participants