-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b80
-
x86
-
windows_xp
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2161761 | 6u12 | Jiri Tusla | P4 | Closed | Fixed | b01 |
FULL PRODUCT VERSION :
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Tested on Windows 2000, XP. Most likely OS-independent.
A DESCRIPTION OF THE PROBLEM :
The Croatian locale still has a wrong numeric date format. for the SHORT and MEDIUM forms. E.g. 14 October 1985 is formatted as "1985.10.14". This date format is wrong.
The correct format should be "14.10.1985." (MEDIUM) or "14.10.85." (SHORT), just as it is in the Serbian locale (sr_RS).
See also:
- The Windows locale definition, which is correct.
- Bug# 4807540 for further explanation by other users.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Dates should be expressed in Croatian standard format: day period month period year period.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.*;
import java.text.*;
public class Test {
public static void main(String[] params) {
Locale locale = new Locale("hr", "HR");
Locale.setDefault(locale);
String s = DateFormat.getDateInstance(DateFormat.MEDIUM, locale).format(new Date());
System.out.println(s);
}
}
---------- END SOURCE ----------
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Tested on Windows 2000, XP. Most likely OS-independent.
A DESCRIPTION OF THE PROBLEM :
The Croatian locale still has a wrong numeric date format. for the SHORT and MEDIUM forms. E.g. 14 October 1985 is formatted as "1985.10.14". This date format is wrong.
The correct format should be "14.10.1985." (MEDIUM) or "14.10.85." (SHORT), just as it is in the Serbian locale (sr_RS).
See also:
- The Windows locale definition, which is correct.
- Bug# 4807540 for further explanation by other users.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Dates should be expressed in Croatian standard format: day period month period year period.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.*;
import java.text.*;
public class Test {
public static void main(String[] params) {
Locale locale = new Locale("hr", "HR");
Locale.setDefault(locale);
String s = DateFormat.getDateInstance(DateFormat.MEDIUM, locale).format(new Date());
System.out.println(s);
}
}
---------- END SOURCE ----------
- backported by
-
JDK-2161761 Wrong date format for Croatian (hr) locale
-
- Closed
-