mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:07:45 +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:
parent
f5669a1373
commit
3720f4bd8f
5 changed files with 11 additions and 29 deletions
|
@ -935,15 +935,8 @@ bool ISO8601Parser::parse_time_zone_iana_name()
|
|||
transaction.commit();
|
||||
return true;
|
||||
};
|
||||
StateTransaction transaction { *this };
|
||||
if (parse_etc_gmt_with_offset()) {
|
||||
// no-op.
|
||||
} else if (!parse_time_zone_iana_name_tail()) {
|
||||
return false;
|
||||
}
|
||||
m_state.parse_result.time_zone_iana_name = transaction.parsed_string_view();
|
||||
transaction.commit();
|
||||
return true;
|
||||
return parse_etc_gmt_with_offset()
|
||||
|| parse_time_zone_iana_name_tail();
|
||||
}
|
||||
|
||||
// https://tc39.es/proposal-temporal/#prod-TimeZoneIdentifier
|
||||
|
@ -958,6 +951,7 @@ bool ISO8601Parser::parse_time_zone_identifier()
|
|||
} else if (!parse_time_zone_utc_offset_name()) {
|
||||
return false;
|
||||
}
|
||||
m_state.parse_result.time_zone_identifier = transaction.parsed_string_view();
|
||||
transaction.commit();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue