Enable fractionalSecondDigits option support in Intl.DateTimeFormat
Categories
(Core :: JavaScript: Internationalization API, enhancement)
Tracking
()
People
(Reporter: Waldo, Assigned: anba)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
+++ This bug was initially created as a clone of Bug #1568134 +++
We've basically implemented this, but it's nightly-only now because
From https://github.com/tc39/ecma402/pull/347#issuecomment-515874110:
I've filed the following two ICU bug reports:
to quote bug 1568134 comment 5. Filing a bug on this to give a number to use in ecma-402 PR tracking tables.
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Depends on D95270
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D95271
Pushed by cbrindusan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4a8cd93a0876 Part 1: Ship "fractionalSecondDigits" option for Intl.DateTimeFormat. r=yulia https://hg.mozilla.org/integration/autoland/rev/8a2e8d901a43 Part 2: Enable "fractionalSecondDigits" test262 tests by default. r=yulia
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4a8cd93a0876
https://hg.mozilla.org/mozilla-central/rev/8a2e8d901a43
Updated•4 years ago
|
Comment 5•4 years ago
|
||
FYI, I have updated docs for this in preparation for FF84:
- Intl.DateTimeFormat() constructor - added
fractionalSecondDigits
to syntax - Interactive example will show some use of the options, including
fractionalSecondDigits
- For more information on this docs work see https://github.com/mdn/sprints/issues/3897
Questions:
- ON testing fractionalSecondDigits appears to truncate the fractional part rather than rounding - is this correct?
- dateStyle and timeStyle do not appear to be able to work in conjunction with the other options (i.e. you can't specify a dateStyle and then use hour, second, fractionalSecondDigits etc to specify the time. Is that correct?
Assignee | ||
Comment 6•4 years ago
|
||
(In reply to Hamish Willee from comment #5)
FYI, I have updated docs for this in preparation for FF84:
Cool, thanks!
Questions:
- ON testing fractionalSecondDigits appears to truncate the fractional part rather than rounding - is this correct?
Yes, the property is spec'ed to truncate its input.
- dateStyle and timeStyle do not appear to be able to work in conjunction with the other options (i.e. you can't specify a dateStyle and then use hour, second, fractionalSecondDigits etc to specify the time. Is that correct?
Yes, dateStyle
and timeStyle
are currently all or nothing. This is a restriction based on the underlying CLDR data (https://unicode-org.atlassian.net/browse/CLDR-13425).
Comment 7•3 years ago
|
||
MDN Documentation completed; see https://github.com/mdn/sprints/issues/3897 for all the details.
Description
•