Open Song-Mengfei opened 10 months ago
[IMPORTANT!: Please do not edit or reply to this comment using the GitHub UI. You can respond to it using CATcher during the next phase of the PE]
duplicate error found as per #5836
[The team marked this bug as a duplicate of the following bug]
When adding an appointment, an invalid date is automatically changed to a valid date without any error messages.
If an invalid date is entered for an appointment, the date is automatically changed to a valid date and the appointment is created with no error message being shown. Instead, an error should be shown.
Steps to reproduce:
- Add a patient and a doctor.
- Enter the command
appt /for 1 /doc 1 /d ABCD /on 31-02-2024 10:00
.
[original: nus-cs2103-AY2324S1/pe-interim#5724] [original labels: type.FunctionalityBug severity.Medium]
[This is the team's response to the above 'original' bug]
Thanks for pointing it out! Accepting it but moving it to a low severity - it is unlikely that such a date will be inputted, and this is specific to the month of february (because of the leap year). Also, this is as a result of the java import of LocalDateTime, which is not able to properly parse for these rare edge cases
as seen below, works for other months
Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)
Reason for disagreement: [replace this with your reason]
I add an inccorct
DATE_TIME
(29-02-2025) to theappt
commnand line, there is no error message and changes the date to (28-02-2025).