-
Notifications
You must be signed in to change notification settings - Fork 185
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
Rename Islamic
calendars to Hijri
#6225
Conversation
cc @sffc Probably not: this matches https://github.com/tc39/proposal-intl-era-monthcode
shrug it's still the BCP47 name, that's fine for me. Might be worth doing in a future calendrical_calculations breaking update. |
Our calendars are actually already documented to support only
Which is irrelevant for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes:
- The calendar names
- The AnyCalendar and AnyCalendarKind variants
- The data markers
This does not rename any era codes.
it does now! |
This reverts commit feb93ab.
ok fine |
It's relevant in that the name is still valid. Yes, the book also calls them islamic. I think the crate matches the book algorithm names most closely.
Yeah that's not in line with the tc39 proposal but they keep changing so we can wait. |
We should change API names, but not any codes. I don't think this changes codes but I might have missed it. |
So the docs are wrong? The Hijra calendars all say
but many of them accept multiple codes, and return different codes than "ah". What's the intended behaviour? |
Yeah, they're inaccurate. The calendars do support a single era (communicating this is the purpose of that line of docs), however that era may have aliases. This stuff has changed a bunch of times. |
If there's only a singleton era, why validate the era at all? |
My mental model is that a "calendar is a collection of eras", and "an era is a system to project epoch days into an era-year, month-code, day tuple". This framing makes cases like JapaneseModern easy to model: it uses the Gregorian eras until 1868, along with all Gregorian rules. As another example, I would not be surprised if there was support to make the Hijri calendar use one of the other eras for dates before the Hijri. |
#6214
Can we change the era code to behijri
instead ofislamic
?it could also beah
, given that other calendars use (Latin) abbreviationscalendrical_calculations
also uses "islamic", do we want to change that?