1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:37:44 +00:00

LibJS: Fix numeric type confusion in GetEpochFromISOParts return value

This is an editorial change in the Temporal spec.

See: 2a59eac
This commit is contained in:
Linus Groh 2022-04-29 19:10:21 +02:00
parent 70593b7448
commit 76a6bd0e75
5 changed files with 12 additions and 12 deletions

View file

@ -61,7 +61,7 @@ ThrowCompletionOr<BigInt const*> interpret_iso_date_time_offset(GlobalObject& gl
// a. Let epochNanoseconds be GetEpochFromISOParts(year, month, day, hour, minute, second, millisecond, microsecond, nanosecond).
auto* epoch_nanoseconds = get_epoch_from_iso_parts(global_object, year, month, day, hour, minute, second, millisecond, microsecond, nanosecond);
// b. Return epochNanoseconds offsetNanoseconds.
// b. Return epochNanoseconds (offsetNanoseconds).
auto offset_nanoseconds_bigint = Crypto::SignedBigInteger::create_from((i64)offset_nanoseconds);
return js_bigint(vm, epoch_nanoseconds->big_integer().minus(offset_nanoseconds_bigint));
}