dateutils icon indicating copy to clipboard operation
dateutils copied to clipboard

datetest appears to accept nonsense when using --isvalid

Open Earnestly opened this issue 2 years ago • 1 comments

datetest --isvalid -i %FT%T -i %F -- 2022-02-27 # Okay
datetest --isvalid -i %FT%T -i %F -- 2022-02-27T # Should fail
datetest --isvalid -i %FT%T -i %F -- 2022-02-27T9999:8888:7777 # Should definately fail

It seems that if 2022-02-27 is matched, anything after it is also accepted.

Is there a proper way to have datetest check the validity of an input based on multiple formats (i.e. a subset of ISO8601 or RFC3339)?

Earnestly avatar Jul 28 '22 08:07 Earnestly

Hi, thanks for the report, good catch. Fix is in 06198a860.

hroptatyr avatar Jul 29 '22 10:07 hroptatyr