mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
LibJS: Fix Instant rounding modes
This is a normative change in the Temporal spec.
See: 0993b75
This commit is contained in:
parent
1755d051fd
commit
b2965cf204
3 changed files with 51 additions and 16 deletions
|
@ -235,8 +235,8 @@ BigInt* round_temporal_instant(GlobalObject& global_object, BigInt const& nanose
|
|||
increment_nanoseconds = increment;
|
||||
}
|
||||
|
||||
// 8. Return RoundNumberToIncrement(ℝ(ns), incrementNs, roundingMode).
|
||||
return js_bigint(vm, round_number_to_increment(nanoseconds.big_integer(), increment_nanoseconds, rounding_mode));
|
||||
// 8. Return RoundNumberToIncrementAsIfPositive(ℝ(ns), incrementNs, roundingMode).
|
||||
return js_bigint(vm, round_number_to_increment_as_if_positive(nanoseconds.big_integer(), increment_nanoseconds, rounding_mode));
|
||||
}
|
||||
|
||||
// 8.5.9 TemporalInstantToString ( instant, timeZone, precision ), https://tc39.es/proposal-temporal/#sec-temporal-temporalinstanttostring
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue