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 degrade performance by 4.1%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks
✅ 345 untouched benchmarks
⏩ 46 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation du_max_depth_balanced_tree[(6, 4, 10)] 62 ms 64.7 ms -4.14%
Simulation du_summarize_balanced_tree[(5, 4, 10)] 16 ms 16.6 ms -4.06%

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 (5c25094) with main (2822878)

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:

Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails 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

@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: 148.94 MB (+324 KB, +0.21%)

Significant per-binary changes:
  install     1.24 MB ->    1.32 MB  (+80 KB, +6.29%)
  mkdir       1.09 MB ->    1.17 MB  (+80 KB, +7.14%)
  mkfifo      1.09 MB ->    1.16 MB  (+76 KB, +6.83%)
  mknod       1.09 MB ->    1.17 MB  (+76 KB, +6.79%)

@MuntasirSZN
MuntasirSZN force-pushed the date-pl branch 2 times, most recently from c918fea to e991362 Compare August 9, 2026 14:49
@MuntasirSZN

Copy link
Copy Markdown
Contributor Author

@sylvestre @collinfunk @xtqqczze Sorry for ping, can you guys check now?

@xtqqczze

xtqqczze commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@MuntasirSZN Could you please confirm that no code in this PR has been derived from GNU coreutils or any other GPL-licensed source, including small snippets, helper structures, test fixtures, or comments?

If you used an AI assistant during development, please also verify its output carefully, as AI-generated code may reproduce material from GPL-licensed sources, potentially without making the provenance apparent.

@MuntasirSZN

Copy link
Copy Markdown
Contributor Author

@MuntasirSZN Could you please confirm that no code in this PR has been derived from GNU coreutils or any other GPL-licensed source, including small snippets, helper structures, test fixtures, or comments?

If you used an AI assistant during development, please also verify its output carefully, as AI-generated code may reproduce material from GPL-licensed sources, potentially without making the provenance apparent.

No, @xtqqczze. I verified myself.

`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

@sylvestre @cakebaker review pls? Sorry for ping.

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