JDK-8075548 : SimpleDateFormat formatting of "LLLL" in English is incorrect; should be identical to "MMMM"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-03-19
  • Updated: 2016-08-24
  • Resolved: 2015-03-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u60Fixed 9 b59Fixed
Description
The "stand-alone" month names ("LLLL" format) in English are expected to be identical to the "context sensitive" ("MMMM" format) month names, but instead we see only numbers.

This program:

import java.text.*;
import java.util.*;

public class September {
    public static void main(String[] args) throws Throwable {
        Date date = new SimpleDateFormat("yyyy-MM-dd").parse("2010-09-15");
        String[] formats = { "LLLL", "LLL", "LL",
                             "MMMM", "MMM", "MM",
        };
        for (String format : formats) {
            System.out.println(format + " -> " + new SimpleDateFormat(format, new Locale("en")).format(date));
        }
    }
}

prints

LLLL -> 0009
LLL -> 009
LL -> 09
MMMM -> September
MMM -> Sep
MM -> 09

but we expect

LLLL -> September
LLL -> Sep
LL -> 09
MMMM -> September
MMM -> Sep
MM -> 09

The month names are handled correctly in e.g. Czech.

Spec says
http://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html

"""
Month: If the number of pattern letters is 3 or more, the month is interpreted as text; otherwise, it is interpreted as a number.
"""

Workaround is to check whether LLLL yields a number and fall back to MMMM in that case.
We have to have fall-back code anyways to continue working with jdk7.
Comments
When there are no format narrow names, use standalone narrow names. Otherwise, use format names when there are no standalone names.
27-03-2015

The alias tag of CLDR is supposed to be supported as run-time fallback. But that support for LLLL/LLL is missing.
23-03-2015