From f64b69955e5ebd26f3dfcafb32968f91df8a3588 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Fri, 6 May 2022 19:32:57 +0200 Subject: [PATCH] LibJS: Fix numeric type in Date.prototype.toTemporalInstant() This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/435a111 --- Userland/Libraries/LibJS/Runtime/DatePrototype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp index 23bab1fa9a..5f5baaf3ae 100644 --- a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp @@ -1179,7 +1179,7 @@ JS_DEFINE_NATIVE_FUNCTION(DatePrototype::to_temporal_instant) // 1. Let t be ? thisTimeValue(this value). auto t = TRY(this_time_value(global_object, vm.this_value(global_object))); - // 2. Let ns be ? NumberToBigInt(t) × 10^6. + // 2. Let ns be ? NumberToBigInt(t) × ℤ(10^6). auto* ns = TRY(number_to_bigint(global_object, Value(t))); ns = js_bigint(vm, ns->big_integer().multiplied_by(Crypto::UnsignedBigInteger { 1'000'000 }));