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