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

Case-normalisation and/or canonicalisation for Calendar identifiers? #2314

Closed
anba opened this issue Jun 17, 2022 · 3 comments
Closed

Case-normalisation and/or canonicalisation for Calendar identifiers? #2314

anba opened this issue Jun 17, 2022 · 3 comments
Assignees
Labels
spec-text Specification text involved

Comments

@anba
Copy link
Contributor

anba commented Jun 17, 2022

From #1502

12.1.2 IsBuiltinCalendar ( id )
Should calendar ids be case-normalised? For example time zones names are case-normalised and UTS-35 also ignores casing.

Calendar identifiers are currently neither case-normalised nor canonicalised. For example "ISO8601" is currently spec'ed to throw an error:

js> new Temporal.Calendar("ISO8601")
typein:1:1 RangeError: invalid calendar: ISO8601
Stack:
  @typein:1:1

Time zone identifiers are both case-normalised and canonicalised:

js> new Temporal.TimeZone("EuRoPe/lonDON").id
"Europe/London"
js> new Temporal.TimeZone("Japan").id 
"Asia/Tokyo"

And ECMA-402 also applies case-normalisation and canonicalisation for calendars:

js> new Intl.DateTimeFormat("en", {calendar: "GrEgOrY"}).resolvedOptions().calendar 
"gregory"
js> new Intl.DateTimeFormat("en", {calendar: "islamicc"}).resolvedOptions().calendar 
"islamic-civil"
@ptomato
Copy link
Collaborator

ptomato commented Jun 20, 2022

I'm trying to get this solved over at tc39/proposal-intl-enumeration#37.

@ptomato ptomato self-assigned this Aug 11, 2022
@ptomato
Copy link
Collaborator

ptomato commented Aug 31, 2022

The case-sensitivity will be fixed by #2395 although I still intend to pursue the proposal-intl-enumeration issue.

@ptomato ptomato added the spec-text Specification text involved label Oct 20, 2022
@ptomato
Copy link
Collaborator

ptomato commented Oct 20, 2022

The proposal-intl-enumeration issue was rejected, so I'll pursue that as an editorial ECMA-402 pull request once proposal-intl-enumeration reaches stage 4. With #2395 closed, I think that's the only remaining work to be done, and it's independent of Temporal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec-text Specification text involved
Projects
None yet
Development

No branches or pull requests

2 participants