Normative: Fix TemporalCalendarString ambiguity#2394
Merged
ptomato merged 2 commits intoSep 13, 2022
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. |
linusg
added a commit
to linusg/serenity
that referenced
this pull request
Aug 30, 2022
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
linusg
reviewed
Aug 30, 2022
linusg
added a commit
to linusg/serenity
that referenced
this pull request
Aug 30, 2022
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
ptomato
approved these changes
Aug 30, 2022
ptomato
left a comment
Collaborator
There was a problem hiding this comment.
I think it's a good solution. Thanks!
This was referenced Aug 31, 2022
29a6773 to
b2cc89e
Compare
linusg
added a commit
to linusg/serenity
that referenced
this pull request
Sep 2, 2022
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
linusg
added a commit
to linusg/serenity
that referenced
this pull request
Sep 2, 2022
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
linusg
added a commit
to linusg/serenity
that referenced
this pull request
Sep 3, 2022
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
linusg
added a commit
to linusg/serenity
that referenced
this pull request
Sep 3, 2022
This is a normative change in the Temporal spec. See: tc39/proposal-temporal#2394
Collaborator
|
This achieved consensus at the September 2022 TC39 meeting. It already is covered in test262. |
balusch
pushed a commit
to balusch/v8
that referenced
this pull request
Sep 24, 2022
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 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.
This PR fixes issue #2165
CalendarNamehad ambiguities with not justCalendarDateTime, but also with other sub-productions (CalendarTime,DateSpecYearMonthandDateSpecMonthDay). So it was better to removeCalendarNamesub-production fromTemporalCalendarString.ParseTemporalCalendarStringwas modified to useParseISODateTimerather thanTemporalCalendarStringso that whenParseISODateTimeis later updated to implement the conclusions of IETF draft, the changes would automatically apply to calendar strings.ParseTemporalCalendarStringis inToTemporalCalendar, which already checks forIsBuiltinCalendarbefore callingParseTemporalCalendarString. So, one of those steps (checking IsBuiltinCalendar first, or parsing as |CalendarName|) is redundant. Removing the firstIsBuiltinCalendarcheck 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! :)