Skip to content
New issue

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

Cross-Calendar issues #32

Open
2 tasks
steida opened this issue Mar 12, 2024 · 1 comment
Open
2 tasks

Cross-Calendar issues #32

steida opened this issue Mar 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@steida
Copy link
Contributor

steida commented Mar 12, 2024

https://tc39.es/proposal-temporal/docs/calendar.html#writing-cross-calendar-code

  • When looping through all months in a year, use monthsInYear as the upper bound instead of assuming that every year has 12 months.
  • Days in a month are not always continuous. There can be gaps due to political changes in calendars and/or time zones. For this reason, instead of looping through a month from 1 to date.daysInMonth, it's better to start a loop with the first day of the month (.with({day: 1})) and add one day at a time until the month property returns a different value.

Is that all?

@steida steida added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Mar 12, 2024
@steida
Copy link
Contributor Author

steida commented Mar 14, 2024

I removed the bug label because calendar: "iso8601" works—this issue is for supporting other calendars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant