Skip to content

test(format/date): remove duplicate cases and expand full-date boundary coverage#899

Closed
AcEKaycgR wants to merge 3 commits into
json-schema-org:mainfrom
AcEKaycgR:exhaustive-date-suite
Closed

test(format/date): remove duplicate cases and expand full-date boundary coverage#899
AcEKaycgR wants to merge 3 commits into
json-schema-org:mainfrom
AcEKaycgR:exhaustive-date-suite

Conversation

@AcEKaycgR
Copy link
Copy Markdown
Contributor

@AcEKaycgR AcEKaycgR commented May 13, 2026

Applies to: draft-04, draft-07, draft/2019-09, draft/2020-12

Removes 4 duplicate cases and adds 13 new cases across two related character-level categories: string-level boundaries and year-field format.

Removed:

  • "2020-13-01" duplicates "1998-13-01"
  • "1998-04-31" duplicates "2020-04-31"
  • "2021-02-29" and "2020-02-29" in the per-month block duplicate the standalone leap year cases

Added (string-level boundaries):

  • Empty string
  • Embedded whitespace between year and month
  • Trailing character, trailing Z, and space-separated datetime suffix

Added (year-field format):

  • Valid four-digit year 0001 (lower bound)
  • Two-digit, three-digit, and five-digit year
  • Positive and negative sign prefix on year
  • Non-ASCII Bengali digit in year field
  • Alphabetic characters in year field

@jviotti @jdesrosiers @karenetheridge Ready for review. I've grouped these two character-level categories (boundaries and year-format) into this single PR.

@AcEKaycgR AcEKaycgR requested a review from a team as a code owner May 13, 2026 06:23
@jviotti
Copy link
Copy Markdown
Member

jviotti commented May 14, 2026

Maybe let's split the removing of duplicates and the addition of the new tests as separate PRs? Will be easier to review

@AcEKaycgR
Copy link
Copy Markdown
Contributor Author

@jviotti That makes total sense. To make sure I follow:

  • Should I update this PR to only include the removals, and then open a second PR for the additions?
  • Or would you prefer I close this one and open two entirely fresh PRs?

@jviotti
Copy link
Copy Markdown
Member

jviotti commented May 14, 2026

As you wish!

@AcEKaycgR AcEKaycgR closed this May 14, 2026
@AcEKaycgR AcEKaycgR deleted the exhaustive-date-suite branch May 14, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants