From 9a9025dea04178b61f7fbf3caf709b0d505ee9f6 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 5 Nov 2022 11:36:42 -0400 Subject: [PATCH] LibJS: Remove infallibility marker from DefaultTimeZone invocation This is an editorial change to the ECMA-402 spec. See: https://github.com/tc39/ecma402/commit/46aa5cc Also add an ECMA-402 spec link to the DefaultTimeZone implementation, as that definition supersedes ECMA-262. --- Userland/Libraries/LibJS/Runtime/Date.cpp | 1 + .../Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/Date.cpp b/Userland/Libraries/LibJS/Runtime/Date.cpp index de4fb4cbbf..08968714c7 100644 --- a/Userland/Libraries/LibJS/Runtime/Date.cpp +++ b/Userland/Libraries/LibJS/Runtime/Date.cpp @@ -364,6 +364,7 @@ i64 get_named_time_zone_offset_nanoseconds(StringView time_zone_identifier, Cryp } // 21.4.1.10 DefaultTimeZone ( ), https://tc39.es/ecma262/#sec-defaulttimezone +// 6.4.3 DefaultTimeZone ( ), https://tc39.es/ecma402/#sup-defaulttimezone StringView default_time_zone() { return TimeZone::current_time_zone(); diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp index f9d0fb1aa8..ac85f3520c 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp @@ -216,7 +216,7 @@ ThrowCompletionOr initialize_date_time_format(VM& vm, DateTimeF // 30. If timeZone is undefined, then if (time_zone_value.is_undefined()) { - // a. Set timeZone to ! DefaultTimeZone(). + // a. Set timeZone to DefaultTimeZone(). time_zone = default_time_zone(); } // 31. Else,