1
Fork 0
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:
Linus Groh 2022-05-24 18:26:13 +01:00
parent 93a20b3bfb
commit ae1fdf299d
7 changed files with 306 additions and 113 deletions

View file

@ -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 "-".