-
Notifications
You must be signed in to change notification settings - Fork 156
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: Accept and ignore calendar annotation in Instant string #2345
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2345 +/- ##
=======================================
Coverage 95.02% 95.02%
=======================================
Files 20 20
Lines 10820 10820
Branches 1929 1929
=======================================
Hits 10282 10282
Misses 504 504
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 PR is already tested in https://github.com/tc39/test262/blob/main/test/built-ins/Temporal/Instant/from/argument-string.js are we waiting for additional test cases or something else to merge? |
We need to adapt that test to cover other API entry points that take a string and call ToTemporalInstant on it, such as |
This achieved consensus at the July 2022 meeting of TC39, tests are in tc39/test262#3645 |
Parsing an Instant string already ignores the time zone name annotation if one is present, and only takes the offset into account. It's inconsistent to throw if a calendar annotation is present but not if a time zone name annotation is present. Closes: #2143
6d1f153
to
b7cb9f4
Compare
Add TimeHourMinuteBasicFormatNotAmbiguousWithMonthDay TimeZoneNumericUTCOffsetNotAmbiguousWithDayOfMonth TimeZoneNumericUTCOffsetNotAmbiguousWithMonth TimeZoneIdentifier, UnpaddedHour, TimeZoneIANALegacyName productions. Sync the spec of TemporalInstantString, TemporalTimeString TimeZone, TimeZoneBracketedAnnotation, TemporalTimeZoneString, ToTemporalTimeZone, TimeZoneIANAName productions. Fix bug in ScanCalendarDateTimeTimeRequired, ToTemporalTimeZone Change name from Handle<String> to Handle<Object> to hold undefined Update parser tests accordingly. Spec Text: https://tc39.es/proposal-temporal/#sec-temporal-iso8601grammar https://tc39.es/proposal-temporal/#sec-temporal-totemporaltimezone Related PR changes: tc39/proposal-temporal#2284 tc39/proposal-temporal#2287 tc39/proposal-temporal#2345 Bug: v8:11544 Change-Id: I6f1a5e5dedba461db9f36abe76fa97119c1f8c2c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3822342 Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#83123}
Parsing an Instant string already ignores the time zone name annotation if
one is present, and only takes the offset into account. It's inconsistent
to throw if a calendar annotation is present but not if a time zone name
annotation is present.
Closes: #2143