diff options
author | Linus Groh <mail@linusgroh.de> | 2021-07-19 00:25:22 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-07-19 00:59:26 +0100 |
commit | 5516ad7158c8612637a729c0f4ad218449ee87e4 (patch) | |
tree | 4230c2a498972413a1e4433395afe88a14a31124 /Userland/Libraries/LibJS/Runtime | |
parent | d159938acc68dd51e80af1f9c89250062b45fa86 (diff) | |
download | serenity-5516ad7158c8612637a729c0f4ad218449ee87e4.zip |
LibJS: Rename Temporal.now => Temporal.Now
See:
- https://github.com/tc39/proposal-temporal/commit/d0acb66
- https://github.com/tc39/proposal-temporal/commit/0097fdd
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/CommonPropertyNames.h | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/CommonPropertyNames.h b/Userland/Libraries/LibJS/Runtime/CommonPropertyNames.h index 95be6f7be9..23de5d001d 100644 --- a/Userland/Libraries/LibJS/Runtime/CommonPropertyNames.h +++ b/Userland/Libraries/LibJS/Runtime/CommonPropertyNames.h @@ -37,6 +37,7 @@ namespace JS { P(Math) \ P(NEGATIVE_INFINITY) \ P(NaN) \ + P(Now) \ P(Number) \ P(PI) \ P(POSITIVE_INFINITY) \ diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp index fcb44b895a..1b378de9b7 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp @@ -13,7 +13,7 @@ namespace JS::Temporal { -// 2 The Temporal.now Object, https://tc39.es/proposal-temporal/#sec-temporal-now-object +// 2 The Temporal.Now Object, https://tc39.es/proposal-temporal/#sec-temporal-now-object Now::Now(GlobalObject& global_object) : Object(*global_object.object_prototype()) { @@ -30,14 +30,14 @@ void Now::initialize(GlobalObject& global_object) define_native_function(vm.names.instant, instant, 0, attr); } -// 2.1.1 Temporal.now.timeZone ( ), https://tc39.es/proposal-temporal/#sec-temporal.now.timezone +// 2.1.1 Temporal.Now.timeZone ( ), https://tc39.es/proposal-temporal/#sec-temporal.now.timezone JS_DEFINE_NATIVE_FUNCTION(Now::time_zone) { // 1. Return ! SystemTimeZone(). return system_time_zone(global_object); } -// 2.1.2 Temporal.now.instant ( ), https://tc39.es/proposal-temporal/#sec-temporal.now.instant +// 2.1.2 Temporal.Now.instant ( ), https://tc39.es/proposal-temporal/#sec-temporal.now.instant JS_DEFINE_NATIVE_FUNCTION(Now::instant) { // 1. Return ! SystemInstant(). diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp index b4de9fe0b0..34c0ecda94 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Temporal.cpp @@ -27,7 +27,7 @@ void Temporal::initialize(GlobalObject& global_object) auto& vm = this->vm(); u8 attr = Attribute::Writable | Attribute::Configurable; - define_direct_property(vm.names.now, heap().allocate<Now>(global_object, global_object), attr); + define_direct_property(vm.names.Now, heap().allocate<Now>(global_object, global_object), attr); define_direct_property(vm.names.Calendar, global_object.temporal_calendar_constructor(), attr); define_direct_property(vm.names.Duration, global_object.temporal_duration_constructor(), attr); define_direct_property(vm.names.Instant, global_object.temporal_instant_constructor(), attr); |