dateutils
dateutils copied to clipboard
Improve ddiff error behaviour
Say I supply a date to ddiff which fails to parse.
$ dateutils.ddiff "2024-10-dd" today
ddiff: Error: reference DATE must be specified
Usage: datediff [OPTION]... DATE/TIME [DATE/TIME]...
Compute duration from DATE/TIME (the reference date/time) to the other
<...>
First of all, error message "reference DATE must be specified" is misleading, as I did supply a date. If ddiff cannot parse it, it should say "error parsing", "invalid date" or similar.
The other issue is that, after the error, you get the whole help text starting with "Usage:". I have to scroll up a lot to find the error message at the top. Is there a way to suppress the help text?
Hey, thanks for the report. A fix is in bf462b5e9.
Great, thanks for the quick reaction!