- 
    Bug 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    7u21, 9
- 
        b15
- 
        generic
- 
        generic
- 
        Verified
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8048422 | 8u25 | Michael Fang | P4 | Resolved | Fixed | b05 | 
| JDK-8046757 | 8u20 | Michael Fang | P4 | Resolved | Fixed | b20 | 
| JDK-8053679 | emb-8u26 | Michael Fang | P4 | Resolved | Fixed | b17 | 
                    FULL PRODUCT VERSION :
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Tested on ubuntu/linux 10.04 and earlier
macosx 10.6 and earlier
A DESCRIPTION OF THE PROBLEM :
The locale es_DO from your implementation, produces a DateFormat as month, day and year. This is not the date format use in the Dominican Republic it is day, month and year.
ADDITIONAL REGRESSION INFORMATION:
It seems that this is an old bug.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Write a code:
Locale esDO = new Locale("es", "DO");
DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT, esDO);
Calendar cal = Calendar.getInstance(esDO);
cal.set(Calendar.DAY_OF_MONTH, 31);
cal.set(Calendar.MONTH, Calendar.MARCH);
cal.set(Calendar.YEAR, 2012);
System.out.println(esDO + " - " + format.format(cal.getTime()));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
es_DO - 31/03/12
ACTUAL -
es_DO - 03/31/12
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
public class ATest {
public static void main(String[] args) throws Exception {
Locale esDO = new Locale("es", "DO");
DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT, esDO);
Calendar cal = Calendar.getInstance(esDO);
cal.set(Calendar.DAY_OF_MONTH, 31);
cal.set(Calendar.MONTH, Calendar.MARCH);
cal.set(Calendar.YEAR, 2012);
System.out.println(esDO + " - " + format.format(cal.getTime()));
}
}
---------- END SOURCE ----------
            
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Tested on ubuntu/linux 10.04 and earlier
macosx 10.6 and earlier
A DESCRIPTION OF THE PROBLEM :
The locale es_DO from your implementation, produces a DateFormat as month, day and year. This is not the date format use in the Dominican Republic it is day, month and year.
ADDITIONAL REGRESSION INFORMATION:
It seems that this is an old bug.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Write a code:
Locale esDO = new Locale("es", "DO");
DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT, esDO);
Calendar cal = Calendar.getInstance(esDO);
cal.set(Calendar.DAY_OF_MONTH, 31);
cal.set(Calendar.MONTH, Calendar.MARCH);
cal.set(Calendar.YEAR, 2012);
System.out.println(esDO + " - " + format.format(cal.getTime()));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
es_DO - 31/03/12
ACTUAL -
es_DO - 03/31/12
ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
public class ATest {
public static void main(String[] args) throws Exception {
Locale esDO = new Locale("es", "DO");
DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT, esDO);
Calendar cal = Calendar.getInstance(esDO);
cal.set(Calendar.DAY_OF_MONTH, 31);
cal.set(Calendar.MONTH, Calendar.MARCH);
cal.set(Calendar.YEAR, 2012);
System.out.println(esDO + " - " + format.format(cal.getTime()));
}
}
---------- END SOURCE ----------
- backported by
- 
                    JDK-8046757 Wrong dateformat for locale es_DO -           
- Resolved
 
-         
- 
                    JDK-8048422 Wrong dateformat for locale es_DO -           
- Resolved
 
-         
- 
                    JDK-8053679 Wrong dateformat for locale es_DO -           
- Resolved
 
-