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

UTS35 vs BCP47 nomenclature issue for [[Calendar]] #212

Closed
anba opened this issue Feb 1, 2018 · 5 comments
Closed

UTS35 vs BCP47 nomenclature issue for [[Calendar]] #212

anba opened this issue Feb 1, 2018 · 5 comments
Labels
c: spec Component: spec editorial issues s: help wanted Status: help wanted; needs proposal champion

Comments

@anba
Copy link
Contributor

anba commented Feb 1, 2018

From #175:


https://tc39.github.io/ecma402/#sec-properties-of-intl-datetimeformat-instances describes [[Calendar]] as:

[[Calendar]] is a String value with the "type" given in Unicode Technical Standard 35 for the calendar used for formatting.

But which "type" is meant here? The value of the "name" attribute of the element for BCP 47 (https://unicode.org/repos/cldr/tags/latest/common/bcp47/calendar.xml) or the value of "type" attribute of the element (https://unicode.org/repos/cldr/tags/latest/common/main/root.xml)? [...]

For example Intl.DateTimeFormat("de-u-ca-gregory").resolvedOptions().calendar prints "gregory" for me with V8 and SpiderMonkey, but "gregorian" with JSC (on Ubuntu16.04, IIRC JSC uses the system ICU which is ICU55 for Ubuntu16.04; V8 and SpiderMonkey both use ICU60). Right now I'd say only JSC is correct here and "gregorian" is the expected output. [...]


But in the current spec the BCP47 calendar type is used ("gregory" appears four times in the 402 spec, whereas "gregorian" is not mentioned at all).

@srl295
Copy link
Member

srl295 commented Feb 2, 2018

it should be the bcp47 (actually, U extension) type, which is also specified within TR35, with a note that this may differ from the cldr type.

@jungshik
Copy link

I agree with @srl295 . It should be the U-extension type ( https://tools.ietf.org/html/rfc6067 ).

@sffc sffc added c: datetime Component: dates, times, timezones s: help wanted Status: help wanted; needs proposal champion labels Mar 19, 2019
@sffc sffc added c: spec Component: spec editorial issues and removed c: datetime Component: dates, times, timezones labels Dec 7, 2019
@sffc
Copy link
Contributor

sffc commented Dec 7, 2019

I think it would be smart for us to put a list of supported calendars into ECMA-402. We should obey the BCP 47 syntax, including "gregory" for the Gregorian calendar.

The list of CLDR calendars is here:

https://github.com/unicode-org/cldr/blob/master/common/bcp47/calendar.xml

@littledan
Copy link
Member

We've now standardized on UTS 35 locale normalization, which makes it clear that aliases are substituted by canonical values. (This is independent of whether we require actual support for the calendar.) Does this resolve the issue?

@sffc
Copy link
Contributor

sffc commented Jun 5, 2020

JSC now prints "gregory" here, consistent with the other browsers. I'll close this issue; please reopen if there is any further work.

@sffc sffc closed this as completed Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: spec Component: spec editorial issues s: help wanted Status: help wanted; needs proposal champion
Projects
None yet
Development

No branches or pull requests

5 participants