mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11: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:
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()
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue