JDK-6277802 : Spanish American Locale - Wrong SHORT DateFormat
  • Type: Enhancement
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-05-30
  • Updated: 2011-02-16
  • Resolved: 2005-06-15
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
We need our product (already Internationalized) to work for the Spanish US market. When I create a Spanish US locale and use it in the SDK the currency returned is correct but the Date format SHORT is wrong. We think it should be the US date format! We tried this in SDK 1.3* throgh 1.5* and its always the same result!

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java.util.Locale lc = new java.util.Locale("es", "US");
java.util.Date dt = new java.util.Date();
String dateShort = DateFormat.getDateInstance(DateFormat.SHORT, lc).format(dt);
			System.out.println("Date SHORT " + dateShort);

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Its April 8th 2005 so I should see a SHORT US format...

Date SHORT 4/8/05
ACTUAL -
I see a SHORT European format

Date SHORT 8/04/05

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
java.util.Locale lc = new java.util.Locale("es", "US");
java.util.Date dt = new java.util.Date();
String dateShort = DateFormat.getDateInstance(DateFormat.SHORT, lc).format(dt);
			System.out.println("Date SHORT " + dateShort);
---------- END SOURCE ----------
###@###.### 2005-05-30 06:53:20 GMT

Comments
EVALUATION The Spanish/US locale was not supported in JRE 1.4.2 and 5.0 - see http://java.sun.com/j2se/1.4.2/docs/guide/intl/locale.doc.html http://java.sun.com/j2se/1.5.0/docs/guide/intl/locale.doc.html Locale data for this locale has been added to JRE 6.0 build 39 as part of RFE 4324505, using data from the Unicode consortium's Common Locale Data Repository. If a backport to JRE 1.4.2 or 5.0 is needed, this RFE needs to be escalated. ###@###.### 2005-06-15 23:07:48 GMT
15-06-2005