We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tc39-proposal-temporal/lib/civil/shared.mjs
Lines 38 to 41 in db3346f
Issue arises when day and month are both 1, and the day is decremented by 1, e.g:
day
month
MyCivilDate.plus({ days: -1 })
This causes daysInMonth to be called with a month value of 0 which is then decremented by 1 to get the index, which fails.
daysInMonth
0
The text was updated successfully, but these errors were encountered:
Is it correct to decrement year:
year -= 1;
without checking? Remember that gregorian callendar doees not has 0 year and 1 - 1 should be -1.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
tc39-proposal-temporal/lib/civil/shared.mjs
Lines 38 to 41 in db3346f
Issue arises when
day
andmonth
are both 1, and the day is decremented by 1, e.g:This causes
daysInMonth
to be called with a month value of0
which is then decremented by 1 to get the index, which fails.The text was updated successfully, but these errors were encountered: