1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:07:45 +00:00

LibJS: Avoid ambiguity in TimeZone production

This is an editorial change in the Temporal spec.

See: 87a6b0d
This commit is contained in:
Linus Groh 2022-01-22 21:56:06 +00:00
parent 0e3def1d0b
commit e16821f460

View file

@ -974,10 +974,15 @@ bool ISO8601Parser::parse_time_zone_name_required()
bool ISO8601Parser::parse_time_zone() bool ISO8601Parser::parse_time_zone()
{ {
// TimeZone : // TimeZone :
// TimeZoneOffsetRequired // TimeZoneUTCOffset TimeZoneBracketedAnnotation[opt]
// TimeZoneNameRequired // TimeZoneBracketedAnnotation
return parse_time_zone_offset_required() StateTransaction transaction { *this };
|| parse_time_zone_name_required(); if (parse_time_zone_utc_offset())
(void)parse_time_zone_bracketed_annotation();
else if (!parse_time_zone_bracketed_annotation())
return false;
transaction.commit();
return true;
} }
// https://tc39.es/proposal-temporal/#prod-CalendarName // https://tc39.es/proposal-temporal/#prod-CalendarName