Skip to content

date: support european dates and out-of-range years - #13818

Open
MuntasirSZN wants to merge 1 commit into
uutils:mainfrom
MuntasirSZN:date-pl
Open

date: support european dates and out-of-range years#13818
MuntasirSZN wants to merge 1 commit into
uutils:mainfrom
MuntasirSZN:date-pl

Conversation

@MuntasirSZN

@MuntasirSZN MuntasirSZN commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

date accepts DAY.MONTH[.YEAR] dates (yearless forms use the current
year) and years beyond 9999 with any format. uutils/coreutils rejected both,
failing parts of tests/date/date.pl.

Rewrite european dates to ISO before parsing; accept extended years for
all output formats. Adds unit and integration tests.

tests/date/date.pl gnu test now passes.

Signed-off-by: MuntasirSZN muntasir.joypurhat@gmail.com

@codspeed-hq

codspeed-hq Bot commented Aug 9, 2026

Copy link
Copy Markdown

Merging this PR will regress 3 benchmarks

⚡ 4 improved benchmarks
❌ 3 regressed benchmarks
✅ 340 untouched benchmarks
⏩ 46 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation file_custom_format 37.3 ms 40.1 ms -7.1%
Simulation file_iso_dates 41.2 ms 43.2 ms -4.72%
Simulation file_tz_abbreviations 47.5 ms 49 ms -3.07%
Simulation ls_recursive_deep_tree[(200, 2)] 3.6 ms 3.4 ms +5.13%
Simulation du_max_depth_balanced_tree[(6, 4, 10)] 63.2 ms 60.2 ms +5.04%
Simulation du_summarize_balanced_tree[(5, 4, 10)] 16.2 ms 15.5 ms +4.45%
Simulation du_wide_tree[(5000, 500)] 20.8 ms 20.1 ms +3.63%

Tip

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


Comparing MuntasirSZN:date-pl (8cff432) with main (9f29502)

Open in CodSpeed

Footnotes

  1. 46 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.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/date/resolution (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/tail-n0f (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/date/date is no longer failing!

@collinfunk

Copy link
Copy Markdown

These tests are copied from GNU coreutils and should be licensed as such.

@MuntasirSZN

Copy link
Copy Markdown
Contributor Author

These tests are copied from GNU coreutils and should be licensed as such.

Ok I gave attribution

@xtqqczze

xtqqczze commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

These tests are copied from GNU coreutils and should be licensed as such.

As per CONTRIBUTING.md, we cannot accept any changes based on the GNU source code. I recommend closing this PR and starting again from scratch.

@sylvestre

Copy link
Copy Markdown
Contributor

yeah, you need to rewrite the tests

`date` accepts DAY.MONTH[.YEAR] dates (yearless forms use the current
year) and years beyond 9999 with any format. uutils rejected both,
failing parts of tests/date/date.pl.

Rewrite european dates to ISO before parsing; accept extended years for
all output formats. Adds unit and integration tests.

Signed-off-by: MuntasirSZN <muntasir.joypurhat@gmail.com
@MuntasirSZN

Copy link
Copy Markdown
Contributor Author

yeah, you need to rewrite the tests

Ok doing it....

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

Binary size comparison:

Individual binary size comparison VS main (threshold: >=5% AND >=4 KB).

Total size of compared binaries: 147.41 MB (-288 KB, -0.19%)

Significant per-binary changes:
  mkfifo      1.16 MB ->    1.08 MB  (-76 KB, -6.42%)
  mknod       1.16 MB ->    1.09 MB  (-76 KB, -6.38%)
  install     1.31 MB ->    1.24 MB  (-72 KB, -5.36%)
  mkdir       1.16 MB ->    1.09 MB  (-72 KB, -6.04%)

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.

4 participants