mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-02 04:20:28 +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
Notes:
sideshowbarker
2024-07-17 11:10:25 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/f64b69955e Pull-request: https://github.com/SerenityOS/serenity/pull/13944 Reviewed-by: https://github.com/IdanHo
1 changed files with 1 additions and 1 deletions
|
@ -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