-
Notifications
You must be signed in to change notification settings - Fork 158
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
How to deal with Gregorian change dates #626
Comments
Maybe it depends on usage. The proleptic Gregorian calendar is commonly used by people who don't care, because they're dealing with post-1970 dates, and they want simpler code. So I think we need that no matter what else. As for the variants/subtag, the most useful information might come from someone who uses a historically accurate Julian/Gregorian calendar with a cutover date. Do they prefer naming it? Are the names universal and non-controversial? Absent that, I like the generality of the
Nit: I probably missed this from an earlier discussion, by why |
I'd suggest that we have no more and no less than the calendars supported in 402, where > new Date(Date.UTC(1000, 0, 1)).toLocaleString('en-u-ca-gregory', {timeZone: 'UTC'})
'1/1/1000, 12:00:00 AM' It seems that 402 currently does not support But this does seem like a good use case for custom calendars! There could be a cookbook recipe to show how to create a hybrid Gregorian/Julian calendar with whatever parameters are needed to implement the changeover correctly. |
This comment has been minimized.
This comment has been minimized.
Because UTS 35 standardized "gregory" as the BCP47-compatible identifier. Additional context
Could be. If we think these old dates aren't important enough to make built-in calendars, then we can just punt this problem to user land.
This discussion is about human calendars. The ISO-8601 calendar is proleptic Gregorian and isn't affected by the question of how to handle Gregorian change dates. |
As per #541, it seems that we are not intending to add Gregorian calendars with change dates as built-in calendars, and we've determined that the Temporal.Calendar API is sufficient to allow them as userland calendars, so I think we can close this? |
When using a Gregorian calendar, several days were skipped somewhere in the 15th to 19th century when dropping the Julian calendar in favor of modern Gregorian, in order to bring the calendar back into alignment with the sun. However, the time at which these days were skipped, sometimes called the "Gregorian change date", varies from place to place.
How should we encode this in a Temporal calendar API?
"gregory"
(why not "gregorian"?) means proleptic Gregorian, and if you want Julian, you have to use the ID"julian"
for your date."gregory"
, like"gregory-england"
,"gregory-france"
,"gregory-scotland"
, and so forth (see a list here)."gregory-1752"
to indicate that the date change occurred in year 1752.@markusicu @poulsbo
The text was updated successfully, but these errors were encountered: