-
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
Audit era identifiers #6232
Audit era identifiers #6232
Conversation
Should we wait for https://unicode-org.atlassian.net/browse/CLDR-18369 to be resolved? I guess it's harmless to document that status quo |
This documents the status quo. We should then clean this up independent of CLDR-18369 |
Is there a general plan to support |
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.
I like having the constants, good idea.
What is and isn't an "alias" is precisely defined in https://tc39.es/proposal-intl-era-monthcode/#table-eras, we should use the same terminology.
/// Taisho (Japanese) | ||
pub const TAISHO: Era = Era(tinystr!(16, "taisho")); | ||
|
||
// output only?! |
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.
These should be accepted on input too.
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.
I agree, hence the "?!", but I don't want to make changes in this PR.
/// ROC | ||
pub const ROC: Era = Era(tinystr!(16, "roc")); | ||
|
||
/// Alias for [`Self::AD`] |
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.
The aliases go the other way: the canonical TC39 ones are coptic/coptic-inverse, and BD/AD are aliases of them
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.
I marked everything that wasn't documented but still accepted as an alias.
More relevantly defined for us in
It's not currently possible with our architecture, as we use 16-byte tinystrs, and that code is longer |
We're pretty inconsistent in what we accept, and what we return as era codes.
This PR does not change behaviour. It documents current behaviour and moves era identifiers into constants.