-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
The date command is inconsistent with how it parses input, e.g. between the -d and -s flags:
nr@seven:~/m/coreutils$ git describe
0.5.0-6-g6b23e6f32
nr@seven:~/m/coreutils$ ./target/release/coreutils --version
coreutils 0.5.0 (multi-call binary)
nr@seven:~/m/coreutils$ ./target/release/coreutils date -d '-3 days'
Sat Dec 13 12:43:41 EST 2025
nr@seven:~/m/coreutils$ ./target/release/coreutils date -s '-3 days'
error: unexpected argument '-3' found
tip: to pass '-3' as a value, use '-- -3'
[ ... SNIP USAGE ...]
Note that GNU coreutils accepts date -s '-3 days', so this also causes compatibility issues.
I think it would be best if all date flags parse this kind of input the same.
Reactions are currently unavailable