mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:28:11 +00:00
LibJS: Fix off-by-one in balance_iso_date() for leap year inputs
This is a normative change in the Temporal spec.
See: 5ab1822
This commit is contained in:
parent
7270bbb255
commit
70e6eae27b
1 changed files with 2 additions and 2 deletions
|
@ -440,8 +440,8 @@ ISODate balance_iso_date(double year_, double month_, double day)
|
|||
|
||||
// 9. NOTE: To deal with numbers of days greater than the number of days in a year, the following section adds years and subtracts days until the number of days is less than 366 or 365.
|
||||
|
||||
// 10. Let testYear be year + 1.
|
||||
test_year = year + 1;
|
||||
// 10. Let testYear be testYear + 1.
|
||||
test_year += 1;
|
||||
|
||||
// 11. Repeat, while day > ! ISODaysInYear(testYear),
|
||||
while (day > iso_days_in_year(test_year)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue