mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:28:11 +00:00
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: b7bdc65
This commit is contained in:
parent
97cc8f4613
commit
86a7c795f6
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
Add a link
Reference in a new issue