Parcourir la source

LibJS: Rename TimeZoneNumericUTCOffsetNotAmbiguousAllowedNegative

This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/9ddd57e
Linus Groh il y a 3 ans
Parent
commit
e1a6418015

+ 5 - 5
Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp

@@ -780,10 +780,10 @@ bool ISO8601Parser::parse_time_zone_numeric_utc_offset_not_ambiguous_with_day_of
     return true;
 }
 
-// https://tc39.es/proposal-temporal/#prod-TimeZoneNumericUTCOffsetNotAmbiguousAllowedNegativeHour
-bool ISO8601Parser::parse_time_zone_numeric_utc_offset_not_ambiguous_allowed_negative_hour()
+// https://tc39.es/proposal-temporal/#prod-TimeZoneNumericUTCOffsetNotAmbiguousWithMonth
+bool ISO8601Parser::parse_time_zone_numeric_utc_offset_not_ambiguous_with_month()
 {
-    // TimeZoneNumericUTCOffsetNotAmbiguousAllowedNegativeHour :
+    // TimeZoneNumericUTCOffsetNotAmbiguousWithMonth :
     //     TimeZoneNumericUTCOffsetNotAmbiguousWithDayOfMonth
     //     - TimeHourNotValidMonth
     StateTransaction transaction { *this };
@@ -1112,7 +1112,7 @@ bool ISO8601Parser::parse_time_spec_with_optional_time_zone_not_ambiguous()
     //     TimeHourNotValidMonth TimeZone
     //     TimeHour : TimeMinute TimeZone[opt]
     //     TimeHourMinuteBasicFormatNotAmbiguous TimeZoneBracketedAnnotation[opt]
-    //     TimeHour TimeMinute TimeZoneNumericUTCOffsetNotAmbiguousAllowedNegativeHour TimeZoneBracketedAnnotation[opt]
+    //     TimeHour TimeMinute TimeZoneNumericUTCOffsetNotAmbiguousWithMonth TimeZoneBracketedAnnotation[opt]
     //     TimeHour : TimeMinute : TimeSecond TimeFraction[opt] TimeZone[opt]
     //     TimeHour TimeMinute TimeSecondNotValidMonth TimeZone[opt]
     //     TimeHour TimeMinute TimeSecond TimeFraction TimeZone[opt]
@@ -1144,7 +1144,7 @@ bool ISO8601Parser::parse_time_spec_with_optional_time_zone_not_ambiguous()
                     }
                 }
             } else if (parse_time_minute()) {
-                if (parse_time_zone_numeric_utc_offset_not_ambiguous_allowed_negative_hour()) {
+                if (parse_time_zone_numeric_utc_offset_not_ambiguous_with_month()) {
                     (void)parse_time_zone_bracketed_annotation();
                     transaction.commit();
                     return true;

+ 1 - 1
Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h

@@ -130,7 +130,7 @@ public:
     [[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_with_day_of_month();
-    [[nodiscard]] bool parse_time_zone_numeric_utc_offset_not_ambiguous_allowed_negative_hour();
+    [[nodiscard]] bool parse_time_zone_numeric_utc_offset_not_ambiguous_with_month();
     [[nodiscard]] bool parse_time_zone_utc_offset_name();
     [[nodiscard]] bool parse_tz_leading_char();
     [[nodiscard]] bool parse_tz_char();