summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-10-14 10:44:31 -0400
committerLinus Groh <mail@linusgroh.de>2022-10-15 18:05:02 +0200
commitd992cba014444c1ed48d6c68fff4ad86fd62eb3f (patch)
tree4bce00c6103c778d152038bab48e9322810e4712 /Userland
parent735e1c4e20cbd4502902099bddc7e18fcf705a9b (diff)
downloadserenity-d992cba014444c1ed48d6c68fff4ad86fd62eb3f.zip
LibJS: Remove Temporal::DefaultTimeZone
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/e232580
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp3
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp1
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp8
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.h1
4 files changed, 3 insertions, 10 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp
index f89cf666a6..41e38203f9 100644
--- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp
@@ -6,6 +6,7 @@
#include <LibJS/Runtime/AbstractOperations.h>
#include <LibJS/Runtime/Array.h>
+#include <LibJS/Runtime/Date.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/Intl/AbstractOperations.h>
#include <LibJS/Runtime/Intl/DateTimeFormat.h>
@@ -216,7 +217,7 @@ ThrowCompletionOr<DateTimeFormat*> initialize_date_time_format(VM& vm, DateTimeF
// 30. If timeZone is undefined, then
if (time_zone_value.is_undefined()) {
// a. Set timeZone to ! DefaultTimeZone().
- time_zone = Temporal::default_time_zone();
+ time_zone = default_time_zone();
}
// 31. Else,
else {
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp
index e31a88dc41..786d15c895 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp
@@ -7,6 +7,7 @@
#include <AK/Time.h>
#include <LibCrypto/BigInt/SignedBigInteger.h>
#include <LibJS/Runtime/Completion.h>
+#include <LibJS/Runtime/Date.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/Temporal/Calendar.h>
#include <LibJS/Runtime/Temporal/Instant.h>
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp
index 06ffecfe4b..af824bafc9 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.cpp
@@ -54,14 +54,6 @@ String canonicalize_time_zone_name(String const& time_zone)
return *iana_time_zone;
}
-// 11.1.3 DefaultTimeZone ( ), https://tc39.es/proposal-temporal/#sec-defaulttimezone
-// 15.1.3 DefaultTimeZone ( ), https://tc39.es/proposal-temporal/#sup-defaulttimezone
-String default_time_zone()
-{
- // The DefaultTimeZone abstract operation returns a String value representing the valid (11.1.1) and canonicalized (11.1.2) time zone name for the host environment's current time zone.
- return ::TimeZone::current_time_zone();
-}
-
// 11.6.1 CreateTemporalTimeZone ( identifier [ , newTarget ] ), https://tc39.es/proposal-temporal/#sec-temporal-createtemporaltimezone
ThrowCompletionOr<TimeZone*> create_temporal_time_zone(VM& vm, String const& identifier, FunctionObject const* new_target)
{
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.h b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.h
index 929d662b0f..a249317ac8 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.h
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/TimeZone.h
@@ -38,7 +38,6 @@ private:
bool is_valid_time_zone_name(String const& time_zone);
String canonicalize_time_zone_name(String const& time_zone);
-String default_time_zone();
ThrowCompletionOr<TimeZone*> create_temporal_time_zone(VM&, String const& identifier, FunctionObject const* new_target = nullptr);
ISODateTime get_iso_parts_from_epoch(VM&, Crypto::SignedBigInteger const& epoch_nanoseconds);
BigInt* get_iana_time_zone_next_transition(VM&, BigInt const& epoch_nanoseconds, StringView time_zone_identifier);