summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibJS/Runtime/ErrorTypes.h1
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp6
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp11
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h2
4 files changed, 4 insertions, 16 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ErrorTypes.h b/Userland/Libraries/LibJS/Runtime/ErrorTypes.h
index 6c727d90a7..9e0ca0ed0b 100644
--- a/Userland/Libraries/LibJS/Runtime/ErrorTypes.h
+++ b/Userland/Libraries/LibJS/Runtime/ErrorTypes.h
@@ -247,7 +247,6 @@
M(TemporalInvalidPlainTime, "Invalid plain time") \
M(TemporalInvalidPlainTimeLikeObject, "Invalid plain time-like object") \
M(TemporalInvalidPlainYearMonth, "Invalid plain year month") \
- M(TemporalInvalidRelativeToString, "Invalid relative to string '{}'") \
M(TemporalInvalidTime, "Invalid time") \
M(TemporalInvalidTimeString, "Invalid time string '{}'") \
M(TemporalInvalidTimeStringUTCDesignator, "Invalid time string '{}': must not contain a UTC designator") \
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
index c14c25e44f..1f09ea6eb2 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.cpp
@@ -1505,11 +1505,11 @@ ThrowCompletionOr<TemporalZonedDateTime> parse_temporal_relative_to_string(Globa
// 1. Assert: Type(isoString) is String.
- // 2. If isoString does not satisfy the syntax of a TemporalRelativeToString (see 13.33), then
- auto parse_result = parse_iso8601(Production::TemporalRelativeToString, iso_string);
+ // 2. If isoString does not satisfy the syntax of a TemporalDateTimeString (see 13.33), then
+ auto parse_result = parse_iso8601(Production::TemporalDateTimeString, iso_string);
if (!parse_result.has_value()) {
// a. Throw a RangeError exception.
- return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidRelativeToString, iso_string);
+ return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidDateTimeString, iso_string);
}
// 3. Let result be ? ParseISODateTime(isoString).
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp
index 415aa610fc..4154c00ea6 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.cpp
@@ -1725,14 +1725,6 @@ bool ISO8601Parser::parse_temporal_calendar_string()
|| parse_calendar_time();
}
-// https://tc39.es/proposal-temporal/#prod-TemporalRelativeToString
-bool ISO8601Parser::parse_temporal_relative_to_string()
-{
- // TemporalRelativeToString :
- // TemporalDateTimeString
- return parse_temporal_date_time_string();
-}
-
}
#define JS_ENUMERATE_ISO8601_PRODUCTION_PARSERS \
@@ -1744,8 +1736,7 @@ bool ISO8601Parser::parse_temporal_relative_to_string()
__JS_ENUMERATE(TemporalTimeZoneString, parse_temporal_time_zone_string) \
__JS_ENUMERATE(TemporalYearMonthString, parse_temporal_year_month_string) \
__JS_ENUMERATE(TemporalZonedDateTimeString, parse_temporal_zoned_date_time_string) \
- __JS_ENUMERATE(TemporalCalendarString, parse_temporal_calendar_string) \
- __JS_ENUMERATE(TemporalRelativeToString, parse_temporal_relative_to_string)
+ __JS_ENUMERATE(TemporalCalendarString, parse_temporal_calendar_string)
Optional<ParseResult> parse_iso8601(Production production, StringView input)
{
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h b/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h
index 1010248af7..fdd7a9a3ba 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/ISO8601.h
@@ -60,7 +60,6 @@ enum class Production {
TemporalYearMonthString,
TemporalZonedDateTimeString,
TemporalCalendarString,
- TemporalRelativeToString,
};
Optional<ParseResult> parse_iso8601(Production, StringView);
@@ -182,7 +181,6 @@ public:
[[nodiscard]] bool parse_temporal_year_month_string();
[[nodiscard]] bool parse_temporal_zoned_date_time_string();
[[nodiscard]] bool parse_temporal_calendar_string();
- [[nodiscard]] bool parse_temporal_relative_to_string();
private:
struct State {