nus-cs2113-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Errors of date information when adding a transaction #768

Open nus-pe-bot opened 18 hours ago

nus-pe-bot commented 18 hours ago

If the user gives an invalid date information(eg, 30-02-2025), there are not error messages shown on the screen. Instead, the system regards it as 28-02-2025.

What about trying to check the dates not only according to the format but also its validation?

The commands are shown below: image.png


[original: nus-cs2113-AY2425S1/pe-interim#762] [original labels: severity.Medium type.FunctionalityBug]

SemiColonKen commented 3 hours ago

Team's Response

Agree that the bug exists. Date validation is actually checked in the app but DateTimeFormatter uses a smart ResolverStyle by default when strict ResolverStyle should have been used. The smart ResolverStyle would allow date between 1 to 31 for all months. Given that 30-02-2025 exceeds that last date of February, the app adjusted the date to 28-02-202 (last date of Feb 2025) because of the Formatter. Thank you for catching the bug.

Duplicate status (if any):

--