mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +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()
|
bool ISO8601Parser::parse_temporal_instant_string()
|
||||||
{
|
{
|
||||||
// TemporalInstantString :
|
// TemporalInstantString :
|
||||||
// Date TimeZoneOffsetRequired
|
// Date TimeSpecSeparator[opt] TimeZoneOffsetRequired
|
||||||
// Date DateTimeSeparator TimeSpec TimeZoneOffsetRequired
|
|
||||||
StateTransaction transaction { *this };
|
StateTransaction transaction { *this };
|
||||||
if (!parse_date())
|
if (!parse_date())
|
||||||
return false;
|
return false;
|
||||||
if (!parse_time_zone_offset_required()) {
|
(void)parse_time_spec_separator();
|
||||||
if (!parse_date_time_separator())
|
|
||||||
return false;
|
|
||||||
if (!parse_time_spec())
|
|
||||||
return false;
|
|
||||||
if (!parse_time_zone_offset_required())
|
if (!parse_time_zone_offset_required())
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue