mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 20:33:10 +00:00
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
This commit is contained in:
parent
c6f7214a60
commit
f64b69955e
|
@ -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 }));
|
||||
|
||||
|
|
Loading…
Reference in a new issue