|
Quick Lists
|
|
Bug ID:
|
6645271
|
|
Votes
|
5
|
|
Synopsis
|
Wrong date format for Croatian (hr) locale
|
|
Category
|
java:localization
|
|
Reported Against
|
|
|
Release Fixed
|
|
|
State
|
6-Fix Understood,
bug
|
|
Priority:
|
4-Low
|
|
Related Bugs
|
|
|
Submit Date
|
25-DEC-2007
|
|
Description
|
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 ----------
Posted Date : 2007-12-25 02:30:25.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
Jiri will take care of it.
Posted Date : 2007-12-25 13:01:06.0
Looking onto a several resources, how they define the pattern.
CLDR: yyyy.MM.dd, yyyy.MM.dd
windows: d.M.yy, dd.MM.yyyy, - there are more with same order - day-month-year
Solaris: %Y.%m.%d
Linux: %d.%m.%Y
Based on this the score is 2:2. Please supply official specification. Thanks.
Posted Date : 2008-01-08 10:44:15.0
Thanks to Yuka I now have some official web resources:
http://www.predsjednik.hr/ - government, president site, uses: dd.MM.yyyy
http://www.vlada.hr/ - government portal, uses: dd.MM.yyyy
http://www.ihjj.hr - croatian language institute, uses dd.MM.yyyy
Asked for clarification for short format on language institute. Waiting for reply.
Posted Date : 2008-01-18 14:03:48.0
Talking to the director of croation language institute. She confirmed that the short format is correct like "dd.MM.yy." (note the dot at the end) but should not be officially used.
OK, now I have all required infos, could fix as requested.
Posted Date : 2008-02-27 09:29:57.0
|
|
Comments
|
Submitted On 13-FEB-2008
ilazic
We are having the same problem. Is there any progress with this bug?
Submitted On 25-FEB-2008
There was the same bug in Slovenian locale in version 1.4.1. It was fixed in 1.5.
In that bug report they are also mentioning that the same problem exists in Croatian locale. Please check this:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4807540
Submitted On 11-SEP-2008
Its been almost a year since this bug was submited. Fix for this is trivial: just change the format in sun.text.resources.LocaleElements_hr for version jdk1.5 or FormatData_hr class for version jdk1.6
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |