date: handle parentheses as comments like GNU date#10133
date: handle parentheses as comments like GNU date#10133cakebaker merged 2 commits intouutils:mainfrom
Conversation
|
similar tests landed in GNU: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
There was a problem hiding this comment.
There is a minor difference in the error message if an invalid date contains a comment: GNU date shows the comment whereas we don't:
$ date -d "(foo)2026-01-05)"
date: invalid date ‘(foo)2026-01-05)’
$ cargo run -q date -d "(foo)2026-01-05)"
date: invalid date '2026-01-05)'
I'm not sure whether we want to address this issue.
There was a problem hiding this comment.
Oh, I just noticed a bug ;-)
$ cargo run -q date -d "((foo)2026-01-05)"
date: invalid date '2026-01-05)'
$ date -d "((foo)2026-01-05)"
Fri Jan 9 12:00:00 AM CET 2026
There was a problem hiding this comment.
added upstream:
coreutils/coreutils@210c000
fc2268c to
92ba14f
Compare
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
Merging this PR will not alter performance
Comparing Footnotes
|
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
|
GNU testsuite comparison: |
* date: handle parentheses as comments like GNU date * simplify the code Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com> --------- Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
No description provided.