mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
LibJS: Use the rounding abstract operations from Intl.NumberFormat V3
This is an editorial change in the Temporal spec.
See: 75279e5
Co-Authored-By: Idan Horowitz <idan.horowitz@gmail.com>
This commit is contained in:
parent
93a20b3bfb
commit
ae1fdf299d
7 changed files with 306 additions and 113 deletions
|
@ -382,7 +382,7 @@ String format_iso_time_zone_offset_string(double offset_nanoseconds)
|
|||
// 1. Assert: offsetNanoseconds is an integer.
|
||||
VERIFY(trunc(offset_nanoseconds) == offset_nanoseconds);
|
||||
|
||||
// 2. Set offsetNanoseconds to ! RoundNumberToIncrement(offsetNanoseconds, 60 × 10^9, "halfExpand").
|
||||
// 2. Set offsetNanoseconds to RoundNumberToIncrement(offsetNanoseconds, 60 × 10^9, "halfExpand").
|
||||
offset_nanoseconds = round_number_to_increment(offset_nanoseconds, 60000000000, "halfExpand"sv);
|
||||
|
||||
// 3. If offsetNanoseconds ≥ 0, let sign be "+"; otherwise, let sign be "-".
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue