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

Should built-in calendars of non-Intl implementations be limited to "iso8601"? #2192

Closed
gibson042 opened this issue Apr 27, 2022 · 4 comments · Fixed by #2193
Closed

Should built-in calendars of non-Intl implementations be limited to "iso8601"? #2192

gibson042 opened this issue Apr 27, 2022 · 4 comments · Fixed by #2193
Assignees
Labels
behavior Relating to behavior defined in the proposal calendar Part of the effort for Temporal Calendar API meeting-agenda normative Would be a normative change to the proposal spec-text Specification text involved

Comments

@gibson042
Copy link
Collaborator

It seems strange to me that an ECMA-262 implementation is prohibited from supporting e.g. "gregory" or "islamicc" calendars unless it also implements all requirements of ECMA-402, but that is the current state of https://tc39.es/proposal-temporal/#sec-temporal-isbuiltincalendar .

@gibson042 gibson042 added behavior Relating to behavior defined in the proposal spec-text Specification text involved calendar Part of the effort for Temporal Calendar API labels Apr 27, 2022
@ljharb
Copy link
Member

ljharb commented Apr 27, 2022

I'm pretty sure Intl shouldn't have any powers that hosts don't have.

@ptomato
Copy link
Collaborator

ptomato commented Apr 27, 2022

In the other thread you mentioned that toLocaleString is an extension point, which I had forgotten about. Although I really don't think it's a good idea to add more implementation-defined behaviour to ECMA-262, I can understand this point of view.

I think we could solve this by adding language to these operations that approximately says "this is the minimal implementation for hosts that don't include ECMA-402", like we do for time zones.

The complication that I'd like to avoid is having a similar situation as #1996 but for calendars instead of time zones. I think we can avoid this by forbidding implementations from supporting non-UTS-35 calendars, and saying that any UTS-35 calendars that they do support must be subject to the same specifications as described in ECMA-402.

@gibson042
Copy link
Collaborator Author

I think we could solve this by adding language to these operations that approximately says "this is the minimal implementation for hosts that don't include ECMA-402", like we do for time zones.

The complication that I'd like to avoid is having a similar situation as #1996 but for calendars instead of time zones. I think we can avoid this by forbidding implementations from supporting non-UTS-35 calendars, and saying that any UTS-35 calendars that they do support must be subject to the same specifications as described in ECMA-402.

Right, my suggestion at #2155 (comment) was

This function returns a List of String values representing calendar types supported by the implementation. The contents of the List are implementation-defined, but must contain *"iso8601"* and must not contain any String value that does not identify a calendar type in the Unicode Common Locale Data Repository (CLDR).

@gibson042 gibson042 transferred this issue from tc39/proposal-temporal May 12, 2022
@gibson042 gibson042 transferred this issue from tc39/ecma402 May 12, 2022
gibson042 added a commit to gibson042/proposal-temporal that referenced this issue May 12, 2022
@ptomato ptomato added meeting-agenda normative Would be a normative change to the proposal labels May 12, 2022
@ptomato
Copy link
Collaborator

ptomato commented May 12, 2022

We have a spec PR to consider, #2193

I wouldn't be opposed to this, although do we have any implementations that are likely to be in this in-between space?

@gibson042 gibson042 changed the title Should built-in calendars of non-402 implementations be limited to "iso8601"? Should built-in calendars of non-Intl implementations be limited to "iso8601"? May 19, 2022
ptomato pushed a commit to gibson042/proposal-temporal that referenced this issue Jun 13, 2022
Aditi-1400 pushed a commit to Aditi-1400/proposal-temporal that referenced this issue Jun 21, 2022
ptomato added a commit that referenced this issue Nov 2, 2022
These were previously marked as being specified for "non-402"
implementations, which is no longer accurate after #2192 which made it
possible for non-402 implementations to support additional CLDR calendars.

This made the "Assert: _calendar_.[[Identifier]]" steps invalid.

Change the description of the methods so that they are the "minimal"
specification for implementations which only support iso8601.

Closes: #2384
Ms2ger pushed a commit that referenced this issue Nov 3, 2022
These were previously marked as being specified for "non-402"
implementations, which is no longer accurate after #2192 which made it
possible for non-402 implementations to support additional CLDR calendars.

This made the "Assert: _calendar_.[[Identifier]]" steps invalid.

Change the description of the methods so that they are the "minimal"
specification for implementations which only support iso8601.

Closes: #2384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior Relating to behavior defined in the proposal calendar Part of the effort for Temporal Calendar API meeting-agenda normative Would be a normative change to the proposal spec-text Specification text involved
Projects
None yet
3 participants