Enhances the Intl.DateTimeFormat API by adding a “ fractionalSecondDigits” option to control the format of fractions of a second.

Motivation

The Date object in ECMAScript stores time information with millisecond precision. Some web developers need to output milliseconds. This option enhances Intl.DateTimeFormat to control formatting of fractions of second. The value of millisecondDigits should be an integer between 0 to 3 to represent how many digits the DateTimeFormat should output after the decimal mark.

Demo

Documentation

Specification

Specification link


Specification being incubated in a Community Group

Status in Chromium

Blink>JavaScript>Internationalization


Enabled by default (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • Positive
  • No signal
  • No signals

Owners

Intent to Prototype url

Intent to Prototype thread

Search tags

Intl, datetimeformat,

Last updated on 2021-12-13