Repository navigation
Pad the final two year digits in the yy token - #189
Merged
chase-manning merged 2 commits intoOct 11, 2026
Merged
Conversation
AI-assisted implementation and verification using OpenAI Codex.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The
yytoken slices away the first two characters of the calendar year. Years below 100 produce an empty string, 123 becomes3, 987 becomes7, and expanded year 10000 produces000. This does not match the documented two-digit year token.Pad the year magnitude before taking its final two digits. This also ensures negative single-digit years produce two digits, for example
-7becomes07. Add local and UTC regressions for short, expanded, and negative calendar years, keeping existing modern-year cases.Validation: the original regression fails on unchanged master; the negative-year regression also fails before the magnitude fix.
npm testpasses all 151 tests, including the Babel/minification build.git diff --checkpasses. Browser execution and the Node 12.20 minimum were not exercised. This branch is based on clean master and does not include PR #188.AI disclosure: OpenAI Codex assisted with investigation, implementation, regression tests, and this description.