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

hourNo0 does not seem be shipped in any browser #149

Closed
littledan opened this issue Jul 19, 2017 · 4 comments
Closed

hourNo0 does not seem be shipped in any browser #149

littledan opened this issue Jul 19, 2017 · 4 comments

Comments

@littledan
Copy link
Member

It appears to be missing from JSC, SpiderMonkey, ChakraCore and V8, as well as MDN documentation. However, it was specified since ECMA 402 v1. Maybe it's missing because there aren't any test262 tests for it.

What should we do about this feature?

@caridy
Copy link
Contributor

caridy commented Jul 19, 2017

@littledan are you talking about resolvedOptions() or options that can be passed in during construction? By looking at the spec, I do see hourNo0 used internally (data layer), but it is not exposed to users on resolvedOptions():

The function returns a new object whose properties and attributes are set as if constructed by an object literal assigning to each of the following properties the value of the corresponding internal slot of this DateTimeFormat object (see 12.5): locale, calendar, numberingSystem, timeZone, hour12, weekday, era, year, month, day, hour, minute, second, and timeZoneName. Properties whose corresponding internal slots have the value undefined are not assigned.

And it is definitely not used as an option. How is this ever exposed to user-land?

@littledan
Copy link
Member Author

Step 27.c.i of InitializeDateTimeFormat does not seem to be implemented by anyone. You can test that with the following code:

Intl.DateTimeFormat(undefined, {hour: 'numeric', hour12: true, get hourNo0() { print('yes') }})

Or, you can just search for the string hourNo0, which doesn't seem to exist in the ChakraCore, V8, JSC or SpiderMonkey codebases, or test262.

@caridy
Copy link
Contributor

caridy commented Jul 19, 2017

@littledan that step is not a Get() on the options, but on the internal data structure:

Let hr12 be ? GetOption(options, "hour12", "boolean", undefined, undefined).
... vs ...
Let hourNo0 be Get(dataLocaleData, "hourNo0").

That's probably the confusing part, but hourNo0 has never been an option AFAICT, nor a resolved option.

@littledan
Copy link
Member Author

Sorry for my confusion here!

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

No branches or pull requests

2 participants