date: support european dates and out-of-range years - #13818
Conversation
Merging this PR will regress 3 benchmarks
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
|
GNU testsuite comparison: |
|
These tests are copied from GNU coreutils and should be licensed as such. |
Ok I gave attribution |
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. |
|
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
Ok doing it.... |
|
Binary size comparison: |
dateacceptsDAY.MONTH[.YEAR]dates (yearless forms use the currentyear) 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