Skip to content

Review Section 5.1.1. Dates#547

Merged
colincasey merged 5 commits intomasterfrom
review-511
Mar 6, 2026
Merged

Review Section 5.1.1. Dates#547
colincasey merged 5 commits intomasterfrom
review-511

Conversation

@colincasey
Copy link
Copy Markdown
Contributor

Updates parseDate.ts with improved comments and clarifications regarding the RFC6265 compliance.

Adds tests for date parsing edge cases and boundaries:

  • Year boundaries (e.g., 1600, 9999, 10000)
  • Day-of-month limits (e.g., 0, 32)
  • Time component boundaries (e.g., 24:00:00, 23:60:00)
  • Month edge cases (e.g., single character months, invalid abbreviations)
  • Invalid date combinations as per RFC6265
  • Handling of duplicate tokens and consecutive delimiters

Closes #511

Updates `parseDate.ts` with improved comments and clarifications regarding the RFC6265 compliance.

Adds tests for date parsing edge cases and boundaries:

- Year boundaries (e.g., 1600, 9999, 10000)
- Day-of-month limits (e.g., 0, 32)
- Time component boundaries (e.g., 24:00:00, 23:60:00)
- Month edge cases (e.g., single character months, invalid abbreviations)
- Invalid date combinations as per RFC6265
- Handling of duplicate tokens and consecutive delimiters

Closes #511
@colincasey colincasey self-assigned this Nov 6, 2025
colincasey and others added 3 commits November 13, 2025 18:03
Also disabled `no-control-regex` rule since control characters are used throughout the spec.
@colincasey colincasey enabled auto-merge (squash) March 6, 2026 19:29
@colincasey colincasey merged commit 7f3803f into master Mar 6, 2026
16 of 17 checks passed
colincasey added a commit that referenced this pull request Mar 13, 2026
Reorganize the flat it.each in domainMatch.spec.ts into grouped
describe blocks for better readability and alignment with RFC 6265
Section 5.1.3 structure:

- null and undefined inputs (library-specific behavior)
- canonicalization (mixed case, leading dots, non-ASCII/punycode)
- identical strings (RFC condition 1)
- suffix matching with dot boundary (RFC condition 2)
- IP address rejection (RFC condition 2's IP check)

No test cases added or removed — purely structural reorganization.
This follows the pattern established in PR #547 for date tests.

Part of #513
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.

Review Draft 20 - 5.1.1. Dates

3 participants