summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-07-05 19:51:00 +0200
committerLinus Groh <mail@linusgroh.de>2022-07-05 23:15:52 +0200
commit8dcd0d4a063f8dc09cbf6da0e2e0985fffad3969 (patch)
treed00975052b7645ca27b31bd2e3ede2e24916f597
parent7ef3b426853fc941d416d413659ced12f2bf4c1d (diff)
downloadserenity-8dcd0d4a063f8dc09cbf6da0e2e0985fffad3969.zip
LibJS: Rename TimeZoneNumericUTCOffsetNotAmbiguous
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/5ebd34b
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp16
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp
index ee070087c2..16df5c232f 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp
@@ -765,10 +765,10 @@ bool ISO8601Parser::parse_time_zone_utc_offset()
|| parse_utc_designator();
}
-// https://tc39.es/proposal-temporal/#prod-TimeZoneNumericUTCOffsetNotAmbiguous
-bool ISO8601Parser::parse_time_zone_numeric_utc_offset_not_ambiguous()
+// https://tc39.es/proposal-temporal/#prod-TimeZoneNumericUTCOffsetNotAmbiguousWithDayOfMonth
+bool ISO8601Parser::parse_time_zone_numeric_utc_offset_not_ambiguous_with_day_of_month()
{
- // TimeZoneNumericUTCOffsetNotAmbiguous :
+ // TimeZoneNumericUTCOffsetNotAmbiguousWithDayOfMonth :
// TimeZoneNumericUTCOffset but not - TimeZoneUTCOffsetHour
StateTransaction transaction { *this };
if (!parse_time_zone_numeric_utc_offset())
@@ -784,10 +784,10 @@ bool ISO8601Parser::parse_time_zone_numeric_utc_offset_not_ambiguous()
bool ISO8601Parser::parse_time_zone_numeric_utc_offset_not_ambiguous_allowed_negative_hour()
{
// TimeZoneNumericUTCOffsetNotAmbiguousAllowedNegativeHour :
- // TimeZoneNumericUTCOffsetNotAmbiguous
+ // TimeZoneNumericUTCOffsetNotAmbiguousWithDayOfMonth
// - TimeHourNotValidMonth
StateTransaction transaction { *this };
- if (!parse_time_zone_numeric_utc_offset_not_ambiguous()) {
+ if (!parse_time_zone_numeric_utc_offset_not_ambiguous_with_day_of_month()) {
if (!m_state.lexer.consume_specific('-'))
return false;
if (!parse_time_hour_not_valid_month())
@@ -1108,7 +1108,7 @@ bool ISO8601Parser::parse_time_hour_minute_basic_format_not_ambiguous()
bool ISO8601Parser::parse_time_spec_with_optional_time_zone_not_ambiguous()
{
// TimeSpecWithOptionalTimeZoneNotAmbiguous :
- // TimeHour TimeZoneNumericUTCOffsetNotAmbiguous[opt] TimeZoneBracketedAnnotation[opt]
+ // TimeHour TimeZoneNumericUTCOffsetNotAmbiguousWithDayOfMonth[opt] TimeZoneBracketedAnnotation[opt]
// TimeHourNotValidMonth TimeZone
// TimeHour : TimeMinute TimeZone[opt]
// TimeHourMinuteBasicFormatNotAmbiguous TimeZoneBracketedAnnotation[opt]
@@ -1116,7 +1116,7 @@ bool ISO8601Parser::parse_time_spec_with_optional_time_zone_not_ambiguous()
// TimeHour : TimeMinute : TimeSecond TimeFraction[opt] TimeZone[opt]
// TimeHour TimeMinute TimeSecondNotValidMonth TimeZone[opt]
// TimeHour TimeMinute TimeSecond TimeFraction TimeZone[opt]
- // NOTE: Reverse order here because `TimeHour TimeZoneNumericUTCOffsetNotAmbiguous[opt] TimeZoneBracketedAnnotation[opt]` can
+ // NOTE: Reverse order here because `TimeHour TimeZoneNumericUTCOffsetNotAmbiguousWithDayOfMonth[opt] TimeZoneBracketedAnnotation[opt]` can
// be a subset of `TimeHourNotValidMonth TimeZone`, so we'd not attempt to parse that but may not exhaust the input string.
{
StateTransaction transaction { *this };
@@ -1163,7 +1163,7 @@ bool ISO8601Parser::parse_time_spec_with_optional_time_zone_not_ambiguous()
return true;
}
} else {
- (void)parse_time_zone_numeric_utc_offset_not_ambiguous();
+ (void)parse_time_zone_numeric_utc_offset_not_ambiguous_with_day_of_month();
(void)parse_time_zone_bracketed_annotation();
transaction.commit();
return true;
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h b/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h
index 8f49063878..590deb3bf4 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h
@@ -129,7 +129,7 @@ public:
[[nodiscard]] bool parse_time_zone_utc_offset_fraction();
[[nodiscard]] bool parse_time_zone_numeric_utc_offset();
[[nodiscard]] bool parse_time_zone_utc_offset();
- [[nodiscard]] bool parse_time_zone_numeric_utc_offset_not_ambiguous();
+ [[nodiscard]] bool parse_time_zone_numeric_utc_offset_not_ambiguous_with_day_of_month();
[[nodiscard]] bool parse_time_zone_numeric_utc_offset_not_ambiguous_allowed_negative_hour();
[[nodiscard]] bool parse_time_zone_utc_offset_name();
[[nodiscard]] bool parse_tz_leading_char();