Open nus-pe-bot opened 18 hours ago
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.
--
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:
[original: nus-cs2113-AY2425S1/pe-interim#762] [original labels: severity.Medium type.FunctionalityBug]