1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

LibJS: Fix production for time zone name in time zone strings

This is a normative change in the Temporal spec.

See:
- caf013a
- fb7cfa6
This commit is contained in:
Linus Groh 2022-06-27 23:18:10 +01:00
parent f5669a1373
commit 3720f4bd8f
5 changed files with 11 additions and 29 deletions

View file

@ -1695,10 +1695,10 @@ ThrowCompletionOr<TemporalTimeZone> parse_temporal_time_zone_string(GlobalObject
if (!parse_result.has_value())
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidTimeZoneString, iso_string);
// 3. Let each of z, offsetString, and name be the source text matched by the respective UTCDesignator, TimeZoneNumericUTCOffset, and TimeZoneIANAName Parse Node contained within parseResult, or an empty sequence of code points if not present.
// 3. Let each of z, offsetString, and name be the source text matched by the respective UTCDesignator, TimeZoneNumericUTCOffset, and TimeZoneIdentifier Parse Nodes contained within parseResult, or an empty sequence of code points if not present.
auto z = parse_result->utc_designator;
auto offset_string = parse_result->time_zone_numeric_utc_offset;
auto name = parse_result->time_zone_iana_name;
auto name = parse_result->time_zone_identifier;
// 4. If name is empty, then
// a. Set name to undefined.