LibJS: Use the newly added remainder operation in GetISOPartsFromEpoch
This is a normative change in the Temporal spec. No behavioral change, just a clarification. See: https://github.com/tc39/proposal-temporal/commit/b7bdc65
This commit is contained in:
parent
97cc8f4613
commit
86a7c795f6
Notes:
sideshowbarker
2024-07-18 04:28:26 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/86a7c795f6b Pull-request: https://github.com/SerenityOS/serenity/pull/9761 Reviewed-by: https://github.com/IdanHo ✅
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ TimeZone* create_temporal_time_zone(GlobalObject& global_object, String const& i
|
|||
// 11.6.3 GetISOPartsFromEpoch ( epochNanoseconds ), https://tc39.es/proposal-temporal/#sec-temporal-getisopartsfromepoch
|
||||
Optional<ISODateTime> get_iso_parts_from_epoch(BigInt const& epoch_nanoseconds)
|
||||
{
|
||||
// 1. Let remainderNs be epochNanoseconds modulo 10^6.
|
||||
// 1. Let remainderNs be remainder(epochNanoseconds, 10^6).
|
||||
auto remainder_ns_bigint = epoch_nanoseconds.big_integer().divided_by(Crypto::UnsignedBigInteger { 1'000'000 }).remainder;
|
||||
auto remainder_ns = remainder_ns_bigint.to_base(10).to_int<i64>().value();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue