Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6645271

Wrong date format for Croatian (hr) locale

XMLWordPrintable

    • b80
    • x86
    • windows_xp
    • Verified

        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 ----------

              jennyh Jenny Huang (Inactive)
              peytoia Yuka Kamiya (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: