Fractional second formatting #187

dchiba opened this Issue Dec 20, 2012 · 6 comments


None yet

3 participants


This is to track the need to define the syntax to format fractional seconds using pattern letters.

An example of the approach proposed from the CLDR development list is:


Above pattern indicates minimum 3 /up to 6 decimal digits. Advantages of this syntax include might be easier to understand(resembles number format syntax) and a little bit more flexible (can set maximum digits, not only for 9).

We are looking to see if CLDR can add '#' for no-padding digits that may be present, in contrast to 'S', which always prints the specified number of digits by either truncating extra digits or padding zeroes.

We also need to determine how to localize the decimal point. Predefined patterns for locales are generally not available. JSR-310 would like CLDR to do either or both of:

  • Define patterns with fractional seconds with the decimal point localized to the locale
  • Define a pattern letter to print the locale specific punctuation for the decimal point

Currently, CLDR says "Certain ASCII punctuation characters may become variable in the future (for example, ":" being interpreted as the time separator and '/' as a date separator, and replaced by respective locale-sensitive characters in display)." For the second bullet, a dot '.' could work just like the way it works in number formatting.

JSR-310 can then consider predefined formatter(s) in DateTimeFormatters and the syntax support based on the CLDR defined patterns and syntax.

ThreeTen member

I'm happy to use # fr fractional seconds. I'm unconvinced that it should be used for non-fractional output.

ThreeTen member

This should probably be in M7 if it is happening, but won't be.


add '#' to the list of reserved characters.


CLDR Ticket 5556 for Optional digits in fractional seconds pattern;

Reserved the "#' character, otherwise, this is an RFE waiting for some action from CLDR.


Related JBS/ 8015990

@RogerRiggs RogerRiggs closed this Sep 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment