-
Notifications
You must be signed in to change notification settings - Fork 157
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
Normative: Fix TemporalCalendarString ambiguity #2394
Normative: Fix TemporalCalendarString ambiguity #2394
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2394 +/- ##
=======================================
Coverage 95.03% 95.03%
=======================================
Files 20 20
Lines 10818 10818
Branches 1925 1925
=======================================
Hits 10281 10281
Misses 503 503
Partials 34 34 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for investigating and fixing this, I can confirm that implementing this change fixes 62 test262 Temporal tests (intl402/built-ins combined) on our end, with no regressions 🎉
One small suggestion.
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good solution. Thanks!
29a6773
to
b2cc89e
Compare
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
This achieved consensus at the September 2022 TC39 meeting. It already is covered in test262. |
Sync with tc39/proposal-temporal#2394 to fix TemporalCalendarString ambiguity issues Spec text: https://tc39.es/proposal-temporal/#sec-temporal-parsetemporalcalendarstring https://tc39.es/proposal-temporal/#sec-temporal-totemporalcalendar Bug: v8:11544 Change-Id: I31d0255e55d1a432681fd060cf4f841cb1479480 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3901196 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#83409}
This PR fixes issue #2165
CalendarName
had ambiguities with not justCalendarDateTime
, but also with other sub-productions (CalendarTime
,DateSpecYearMonth
andDateSpecMonthDay
). So it was better to removeCalendarName
sub-production fromTemporalCalendarString
.ParseTemporalCalendarString
was modified to useParseISODateTime
rather thanTemporalCalendarString
so that whenParseISODateTime
is later updated to implement the conclusions of IETF draft, the changes would automatically apply to calendar strings.ParseTemporalCalendarString
is inToTemporalCalendar
, which already checks forIsBuiltinCalendar
before callingParseTemporalCalendarString
. So, one of those steps (checking IsBuiltinCalendar first, or parsing as |CalendarName|) is redundant. Removing the firstIsBuiltinCalendar
check is more in line with the normative change we wanted to make here (first parse as ISO string, then as calendar name).Thanks @ptomato for all the help! :)