mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 01:26:22 +00:00
LibJS: Replace RoundTowardsZero with truncate
This is an editorial change in the Temporal spec. See:
409ab66
This commit is contained in:
parent
019211bcb4
commit
4fbec2e8b3
Notes:
sideshowbarker
2024-07-17 18:06:52 +09:00
Author: https://github.com/trflynn89
Commit: 4fbec2e8b3
Pull-request: https://github.com/SerenityOS/serenity/pull/15589
Reviewed-by: https://github.com/davidot ✅
Reviewed-by: https://github.com/linusg ✅
6 changed files with 12 additions and 12 deletions
|
@ -295,7 +295,7 @@ DateDurationRecord difference_iso_date(VM& vm, i32 year1, u8 month1, u8 day1, i3
|
|||
|
||||
// h. If largestUnit is "week", then
|
||||
if (largest_unit == "week"sv) {
|
||||
// i. Set weeks to RoundTowardsZero(days / 7).
|
||||
// i. Set weeks to truncate(days / 7).
|
||||
weeks = trunc(days / 7);
|
||||
|
||||
// ii. Set days to remainder(days, 7).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue