-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
date: handle parentheses as comments like GNU date #10133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
similar tests landed in GNU: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added upstream:
coreutils/coreutils@210c000
ea7050d to
fc2268c
Compare
|
GNU testsuite comparison: |
No description provided.