diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp index 7996692ff8..a32ec83ae9 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp @@ -180,7 +180,7 @@ ISOYearMonth balance_iso_year_month(double year, double month) year += floor((month - 1) / 12); // 3. Set month to (month − 1) modulo 12 + 1. - month = fmod(month - 1, 12) + 1; + month = modulo(month - 1, 12.0) + 1; // 4. Return the Record { [[Year]]: year, [[Month]]: month }. return ISOYearMonth { .year = static_cast(year), .month = static_cast(month), .reference_iso_day = 0 };