mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
LibJS: Fix logic typo in round_duration() remainder calculation
For unit == "hour", the remainder would not return the difference between fractional_hours and hours, but fractional_hours and days.
This commit is contained in:
parent
f0cd727d74
commit
8c73d85a65
1 changed files with 1 additions and 1 deletions
|
@ -1048,7 +1048,7 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d
|
|||
hours = (double)round_number_to_increment(fractional_hours, increment, rounding_mode);
|
||||
|
||||
// c. Set remainder to fractionalHours - hours.
|
||||
remainder = fractional_hours - days;
|
||||
remainder = fractional_hours - hours;
|
||||
|
||||
// d. Set minutes, seconds, milliseconds, microseconds, and nanoseconds to 0.
|
||||
minutes = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue