diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-15 00:23:11 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-15 00:23:11 +0100 |
commit | 88a31f3bac665218d401f299fe66314c7e4a9e0d (patch) | |
tree | 2e10dbf465e67603a2caf7492b541df4d66b5bac /Userland/Libraries | |
parent | 70398645f37913964626c99def6fe9d9e332a79c (diff) | |
download | serenity-88a31f3bac665218d401f299fe66314c7e4a9e0d.zip |
LibJS: Fix [[TimeZoneOffsetString]] value in ParseTemporalInstantString
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/78c3b8b
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp index 9ba5a4fd67..57830621b0 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp @@ -866,9 +866,8 @@ Optional<TemporalInstant> parse_temporal_instant_string(GlobalObject& global_obj // 7. Assert: offsetString is not undefined. VERIFY(offset_string.has_value()); - // TODO: This is supposed to use `offset_string`, see https://github.com/tc39/proposal-temporal/pull/1799 - // 8. Return the Record { [[Year]]: result.[[Year]], [[Month]]: result.[[Month]], [[Day]]: result.[[Day]], [[Hour]]: result.[[Hour]], [[Minute]]: result.[[Minute]], [[Second]]: result.[[Second]], [[Millisecond]]: result.[[Millisecond]], [[Microsecond]]: result.[[Microsecond]], [[Nanosecond]]: result.[[Nanosecond]], [[TimeZoneOffsetString]]: timeZoneResult.[[OffsetString]] }. - return TemporalInstant { .year = result->year, .month = result->month, .day = result->day, .hour = result->hour, .minute = result->minute, .second = result->second, .millisecond = result->millisecond, .microsecond = result->microsecond, .nanosecond = result->nanosecond, .time_zone_offset = move(time_zone_result->offset) }; + // 8. Return the Record { [[Year]]: result.[[Year]], [[Month]]: result.[[Month]], [[Day]]: result.[[Day]], [[Hour]]: result.[[Hour]], [[Minute]]: result.[[Minute]], [[Second]]: result.[[Second]], [[Millisecond]]: result.[[Millisecond]], [[Microsecond]]: result.[[Microsecond]], [[Nanosecond]]: result.[[Nanosecond]], [[TimeZoneOffsetString]]: offsetString }. + return TemporalInstant { .year = result->year, .month = result->month, .day = result->day, .hour = result->hour, .minute = result->minute, .second = result->second, .millisecond = result->millisecond, .microsecond = result->microsecond, .nanosecond = result->nanosecond, .time_zone_offset = move(offset_string) }; } // 13.37 ParseTemporalCalendarString ( isoString ), https://tc39.es/proposal-temporal/#sec-temporal-parsetemporalcalendarstring |