diff options
author | Linus Groh <mail@linusgroh.de> | 2021-12-08 19:57:19 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-12-08 19:57:19 +0000 |
commit | f1dafabbb924c7b17c2e623a25a3c236f3b479c4 (patch) | |
tree | dcb050153c3f4501d534b923fb4ac8aa8461c79c /Userland | |
parent | 4f3c283f24145d70a0c92d6f5c34638e9bbcf943 (diff) | |
download | serenity-f1dafabbb924c7b17c2e623a25a3c236f3b479c4.zip |
LibJS: Simplify TemporalInstantString
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/271d71c
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp index b0d90decba..6d0a9b2566 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp @@ -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; } |