JDK-8217312 : New era placeholder not displayed using java.text.DateFormat
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 11.0.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2019-01-17
  • Updated: 2019-01-28
  • Resolved: 2019-01-17
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
System.out.println(
  new SimpleDateFormat("Gy-M-d", new Locale("ja","JP","JP")).format(
    new Calendar.Builder().setDate(2019,Calendar.MAY,1).build().getTime()))

Expected Result: ������1-5-1

Actual Result: N1-5-1
Comments
It seems to work well using "GGGG" instead of "G". Is this an expected behavior?
28-01-2019

Should this really be closed as "Not an Issue"? Shouldn't it be kept open until the issue fixed in JDK or the update version of CLDR provider integrated to?
24-01-2019

Currently for the placeholder, only COMPAT locale provider is modified to include the names for the new era, that leaves CLDR provider not providing the new era placeholder names. So, the names are coming from COMPAT provider, where the short form is 'N'.
17-01-2019