-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polyfill: RangeError thrown when parsing calendar from time-only string #3090
Labels
Comments
Thanks for catching this. I'll submit a PR to fix the reference code. The spec text is correct, no change needed there. As usual, the fact that this wasn't caught until now means a test262 coverage gap, so I'll keep this issue open and add the test262 label. |
ptomato
added a commit
that referenced
this issue
Feb 15, 2025
https://tc39.es/proposal-temporal/#sec-temporal-parsetemporalcalendarstring ParseTemporalCalendarString specifies to try to parse the string as TemporalDateTimeString[+Zoned], TemporalDateTimeString[~Zoned], TemporalInstantString, TemporalTimeString, TemporalMonthDayString, and TemporalYearMonthString consecutively until one succeeds. I always thought TemporalTimeString would be handled by ParseISODateTime in the polyfill, but it seems I was wrong about that. See: #3090
ptomato
added a commit
that referenced
this issue
Feb 24, 2025
https://tc39.es/proposal-temporal/#sec-temporal-parsetemporalcalendarstring ParseTemporalCalendarString specifies to try to parse the string as TemporalDateTimeString[+Zoned], TemporalDateTimeString[~Zoned], TemporalInstantString, TemporalTimeString, TemporalMonthDayString, and TemporalYearMonthString consecutively until one succeeds. I always thought TemporalTimeString would be handled by ParseISODateTime in the polyfill, but it seems I was wrong about that. See: #3090
ptomato
added a commit
that referenced
this issue
Feb 25, 2025
https://tc39.es/proposal-temporal/#sec-temporal-parsetemporalcalendarstring ParseTemporalCalendarString specifies to try to parse the string as TemporalDateTimeString[+Zoned], TemporalDateTimeString[~Zoned], TemporalInstantString, TemporalTimeString, TemporalMonthDayString, and TemporalYearMonthString consecutively until one succeeds. I always thought TemporalTimeString would be handled by ParseISODateTime in the polyfill, but it seems I was wrong about that. See: #3090
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test case:
Expected: Return the string
"iso8601"
.Actual: Throws a RangeError.
ParseTemporalCalendarString, step 2.b defaults to using
"iso8601"
when no calendar is present in the input string.The text was updated successfully, but these errors were encountered: