jloh02 / pe

0 stars 0 forks source link

Insufficiently clear error message for invalid date #9

Closed jloh02 closed 1 week ago

jloh02 commented 2 weeks ago

Date is already in YYYY-MM-DD format but date is invalid due to it not being a leap year. The error message is insufficient to debug this issue and may require users to carefully read and validate their input before correcting, all the while believing that they have already entered the date in the right format. A better alternative is to state exactly which parts of the date make it invalid, or to output the parsed date as a human readable way (e.g. 12 Jan 2024) so users can debug easily.

image.png

Same for other invalid dates

image.png