Name: smR10189 Date: 06/09/2004
The JDK 1.5 spec. doesn't specify behavior if reserved letters are
used as pattern letters.
It only says:
" Within date and time pattern strings, unquoted letters from 'A' to 'Z'
and from 'a' to 'z' are interpreted as pattern letters representing the
components of a date or time string. Text can be quoted using single quotes
(') to avoid interpretation. "''" represents a single quote. All other
characters are not interpreted; they're simply copied into the output string
during formatting or matched against the input string during parsing.
The following pattern letters are defined (all other characters from 'A' to 'Z'
and from 'a' to 'z' are reserved)"
The spec. doesn't say that using reserved letters is illegal.
In other words, "reserved" letter doesn't mean "illegal" letter.
So an implementation behavior is undefined because it
can handle reserved letters in the following ways:
- simply copying them into the output string
- ignoring them
JDK 1.5.0 implementation rejects patters with reserved letters