[threeten-dev] Possible addition of pattern letters in CLDR

Dan Chiba dan.chiba at oracle.com
Thu Dec 13 20:00:29 PST 2012


Yoshito,

Thank you for filing the CLDR ticket. Your proposal sounds great. May I 
ask the status of the shortest GMT format? When could it be implemented 
by vendors?

As for punctuations, I think comma and dot are already locale sensitive 
for number formatting, so it would be easy for people to understand how 
the locale sensitive punctuations for date time formatting work. Because 
the predefined formatting patterns for locales have the separators for 
date and time fields and they are commonly used, it doesn't seem to be 
an issue that there is no locale sensitive pattern letter for them. So I 
think I am only interested in the decimal separator for fractional 
seconds. Alternatively, if CLDR had predefined locale sensitive patterns 
with fractional seconds, that could also be a solution. For instance, a 
predefined common pattern to print hour, minute, second and millisecond 
for the US locale may look like this:

<dateFormatItem id="HmsS">HH:mm:ss.SSS</dateFormatItem>

Stephen,

Would you elaborate what "p" (prefix for padding) does? Does it make 
sense to have it defined in LDML as well?
Also, do you think 310 can suppor the shortest GMT format if its status 
is ready for implementation?

Regards,
-Dan

On 12/13/2012 3:31 PM, yoshito_umaoka at us.ibm.com wrote:
> Dan Chiba <dan.chiba at oracle.com> wrote on 12/13/2012 06:09:08 PM:
>
> > For the discrepancies between 310 and CLDR, it would be ideal for us
> > to be able to resolve them one way or the other. Personally I look
> > at them as issues because they often cause problems in similar cases.
> >
> > I don't think there is an issue in "I" in CLDR. Printing "I" out of
> > an offset is an attempt to format a nonexistent field. It is the
> > same as attempting a time field when the value is date only or vise
> > versa or anything similar.
> >
> > Another possible difference is punctuations. LDML 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)." I think locale sensitive pattern letters
> > for punctuations are desired, or formatting to the local user's
> > expectation could be difficult to achieve. In particular, the
> > fractional seconds would be difficult, as predefined locale
> > sensitive patterns with fractional seconds are hard to find.
> >
> > Yoshito, would you let us know if you would like us to file a formal
> > request for new pattern letters, please?
> >
> > Regards,
> > -Dan
>
> I've already filed a ticket to CLDR trac system [ 
> http://unicode.org/cldr/trac/ticket/5506].
> I'm a CLDR TC member and I've already asked other CLDR TC folks to 
> look into this.
>
> I'm going to propose:
>
>  - Add n/N/I to the LDML specification with the definition used by JDK
>  - Add X for ISO type format, keeping "ZZZZZ" as an alias of XXX (long 
> ISO)
>
> We probably ended up to define another letter for what CLDR calls 
> "locaized GMT format". There is another requirement for supporting 
> shortest representation of localized GMT format.
>
> For punctuation variable... In my honest opinion, I think there are 
> many issues with introducing punctuation variables.
>
>
> -Yoshito


More information about the threeten-dev mailing list