-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b127
-
Not verified
1) The current spec for j.t.SimpleDateFormat says regarding the month patterns the following:
"Month: If the number of pattern letters is 3 or more, the month is interpreted as text; otherwise, it is interpreted as a number.
Letter M produces context-sensitive month names, such as the embedded form of names. If a DateFormatSymbols has been set explicitly with constructor SimpleDateFormat(String, DateFormatSymbols) or method setDateFormatSymbols(DateFormatSymbols), the month names given by the DateFormatSymbols are used.
Letter L produces the standalone form of month names."
"context-sensitive" doesn't mean "format" here, it means that the form of month (standalone or format or other) will selected dependent on the context.
It would be great to clarify the spec to make it more clear and unambiguous.
For details look at theJDK-8055689.
2) There is a typo in the spec of j.t.DateFormatSymbols::getShortMonths:
"If the language requires different forms for formatting and stand-alone usages, This method returns short month names in the formatting form."
"This method" starts with the upper case symbol.
"Month: If the number of pattern letters is 3 or more, the month is interpreted as text; otherwise, it is interpreted as a number.
Letter M produces context-sensitive month names, such as the embedded form of names. If a DateFormatSymbols has been set explicitly with constructor SimpleDateFormat(String, DateFormatSymbols) or method setDateFormatSymbols(DateFormatSymbols), the month names given by the DateFormatSymbols are used.
Letter L produces the standalone form of month names."
"context-sensitive" doesn't mean "format" here, it means that the form of month (standalone or format or other) will selected dependent on the context.
It would be great to clarify the spec to make it more clear and unambiguous.
For details look at the
2) There is a typo in the spec of j.t.DateFormatSymbols::getShortMonths:
"If the language requires different forms for formatting and stand-alone usages, This method returns short month names in the formatting form."
"This method" starts with the upper case symbol.
- relates to
-
JDK-8055689 SimpleDateFormat.format returns wrong form of month (standalone instead of context-sensitive) for "MMMM" template
-
- Closed
-