Closed Bug 1645107 Opened 4 years ago Closed 3 years ago

Enable fractionalSecondDigits option support in Intl.DateTimeFormat

Categories

(Core :: JavaScript: Internationalization API, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox79 --- wontfix
firefox84 --- fixed

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.

Severity: normal → N/A
Depends on: 1670496
Blocks: test262
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
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
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Regressions: 1674560

FYI, I have updated docs for this in preparation for FF84:

Questions:

  1. ON testing fractionalSecondDigits appears to truncate the fractional part rather than rounding - is this correct?
  2. 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?
Flags: needinfo?(andrebargull)

(In reply to Hamish Willee from comment #5)

FYI, I have updated docs for this in preparation for FF84:

Cool, thanks!

Questions:

  1. 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.

  1. 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).

Flags: needinfo?(andrebargull)

MDN Documentation completed; see https://github.com/mdn/sprints/issues/3897 for all the details.

You need to log in before you can comment on or make changes to this bug.