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

Slovenia Locale, wrong firstDayOfWeek number

XMLWordPrintable

    • b80
    • x86, sparc
    • solaris_2.5.1, solaris_8
    • Verified

        FULL PRODUCT VERSION :
        java version "1.6.0_16"
        Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
        Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 6.1.7600]

        A DESCRIPTION OF THE PROBLEM :
        Slovenian start of week is Monday, which is 2. Java locale/calendar shows 1.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Create a Slovenian locale and approrite calendare - retrieve firstDayOfWeek number.


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Expected firstDayOfWeek to be 2.
        ACTUAL -
        firstDayOfWeek was 1.

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        Locale localeSl = new Locale("sl", "SI");
               
        Calendar calendarSl = new GregorianCalendar(localeSl);
        calendarSl.setTime(new Date());
        System.out.println("Slo Today is day nr.: " + calendarSl.get(Calendar.DAY_OF_WEEK));
        System.out.println("Slo First day of week nr. is: " + calendarSl.getFirstDayOfWeek());
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        Manually set firstDayOfWeek to 2.

              katakai Masaki Katakai
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: