mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:27:35 +00:00
LibJS: Avoid ambiguity in TimeZone production
This is an editorial change in the Temporal spec.
See: 87a6b0d
This commit is contained in:
parent
0e3def1d0b
commit
e16821f460
1 changed files with 9 additions and 4 deletions
|
@ -974,10 +974,15 @@ bool ISO8601Parser::parse_time_zone_name_required()
|
|||
bool ISO8601Parser::parse_time_zone()
|
||||
{
|
||||
// TimeZone :
|
||||
// TimeZoneOffsetRequired
|
||||
// TimeZoneNameRequired
|
||||
return parse_time_zone_offset_required()
|
||||
|| parse_time_zone_name_required();
|
||||
// TimeZoneUTCOffset TimeZoneBracketedAnnotation[opt]
|
||||
// TimeZoneBracketedAnnotation
|
||||
StateTransaction transaction { *this };
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue