summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Temporal
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-06-14 23:43:45 +0100
committerLinus Groh <mail@linusgroh.de>2022-06-15 17:49:20 +0100
commitaaa9524a527713aef10b11a08b98c05d326ab535 (patch)
tree6cef53b96d61e8677d873f88ff5295fc921c47c9 /Userland/Libraries/LibJS/Runtime/Temporal
parent287dd03e2e83d604b8da95dc89b76e2ee5c850e4 (diff)
downloadserenity-aaa9524a527713aef10b11a08b98c05d326ab535.zip
LibJS: Add parentheses around modulo operation
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/90e4b34
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp
index cf8663e025..d34e996a84 100644
--- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp
@@ -176,7 +176,7 @@ ISOYearMonth balance_iso_year_month(double year, double month)
// 2. Set year to year + floor((month - 1) / 12).
year += floor((month - 1) / 12);
- // 3. Set month to (month - 1) modulo 12 + 1.
+ // 3. Set month to ((month - 1) modulo 12) + 1.
month = modulo(month - 1, 12) + 1;
// 4. Return the Record { [[Year]]: year, [[Month]]: month }.