Skip to content

Commit

Permalink
Merge pull request #337 from rxchell/date-parsing-valid-dates
Browse files Browse the repository at this point in the history
Modify Date Parsing - Vaild Dates [Enhancement]
  • Loading branch information
zaidansani authored Nov 11, 2024
2 parents 9eb39e5 + 0f80eab commit bb2dc96
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,12 @@ Team size: 5
* **Sample Input:** User enters `2023-02-29` for an appointment date.
* **Expected Output:** The result display box shows `Invalid date: 2023 is not a leap year, so February 29 is not valid.`

3. **Modify date parsing to check for valid dates**
* **Flaw:** Entering an invalid date such as January 32 returns an error message that says "Invalid date-time format," which is unclear since the format itself is correct.
* **Enhancement:** Modify the date parsing logic to check for valid dates, such as ensuring that the day is within the range of the month.
* **Sample Input:** User enters `2023-03-32` for an appointment date.
* **Expected Output:** The result display box shows `Invalid date: The day is out of range for the month`.

<br>

--------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit bb2dc96

Please sign in to comment.