mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
LibJS: Simplify TemporalInstantString
This is an editorial change in the Temporal spec.
See: 271d71c
This commit is contained in:
parent
4f3c283f24
commit
f1dafabbb9
1 changed files with 4 additions and 10 deletions
|
@ -1145,19 +1145,13 @@ bool ISO8601Parser::parse_duration()
|
|||
bool ISO8601Parser::parse_temporal_instant_string()
|
||||
{
|
||||
// TemporalInstantString :
|
||||
// Date TimeZoneOffsetRequired
|
||||
// Date DateTimeSeparator TimeSpec TimeZoneOffsetRequired
|
||||
// Date TimeSpecSeparator[opt] TimeZoneOffsetRequired
|
||||
StateTransaction transaction { *this };
|
||||
if (!parse_date())
|
||||
return false;
|
||||
if (!parse_time_zone_offset_required()) {
|
||||
if (!parse_date_time_separator())
|
||||
return false;
|
||||
if (!parse_time_spec())
|
||||
return false;
|
||||
if (!parse_time_zone_offset_required())
|
||||
return false;
|
||||
}
|
||||
(void)parse_time_spec_separator();
|
||||
if (!parse_time_zone_offset_required())
|
||||
return false;
|
||||
transaction.commit();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue