Skip to content

Preserve leap days and year boundaries below year 100 - #134

Closed
Narek-Khachikyan wants to merge 1 commit into
d3:mainfrom
Narek-Khachikyan:fix/early-year-date-construction
Closed

Narek-Khachikyan wants to merge 1 commit into
d3:mainfrom
Narek-Khachikyan:fix/early-year-date-construction

Conversation

@Narek-Khachikyan

Copy link
Copy Markdown

Summary

utcParse("%Y-%m-%d")("0004-02-29") returns March 1 because construction passes through non-leap year 1900. Set the intended year, month and day together before normalizing time, also preserving year rollover for offsets and week dates.

Evidence

The regression fails against the unchanged base and passes with this fix. Full test suite and lint pass.

Merge Danger

Door: Two-way. Blast Radius: Formatting.

@Narek-Khachikyan Narek-Khachikyan closed this by deleting the head repository Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant