Time zones: the localized GMT formats

Jon Zeppieri zeppieri at gmail.com
Sun Mar 15 00:23:19 CDT 2015

On Sun, Mar 15, 2015 at 12:09 AM, Philippe Verdy <verdy_p at wanadoo.fr> wrote:
> I suppose that the "short" form will differentiate from the non short form,
> only by stripping zeroes

Unless the value of <hourFormat> is syntactically constrained in ways
not mentioned in the documentation, this isn't enough, as my example
about possible literal strings in <hourFormat> demonstrates. Here's a
more realistic example:

The pl locale's <hourFormat> is "+H.mm;-H.mm". Note that it uses a
literal '.' as the time separator, rather than the pattern variable
':'. If you were going to strip out the mm field here, you'd also want
to strip out the '.'. But unless you know that '.' represents a
separator, rather than some literal portion of the pattern, you really
can't. And even the fact that '.' is the <timeSeparator> for pl
doesn't prove that it's being used that way in the pattern.

My guess is that <hourFormat> *is* syntactically constrained -- that
it's not allowed to use the full pattern syntax -- because if that's
not true then it seems impossible to implement the short form as
specified. So, really, I'm just looking for some confirmation about
what can and cannot appear in <hourFormat>.


More information about the CLDR-Users mailing list