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:
Linus Groh 2022-05-06 19:32:57 +02:00
parent c6f7214a60
commit f64b69955e

View file

@ -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 }));