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

getFirstDayOfWeek() incorrect for Slovenian locale

XMLWordPrintable

    • sparc
    • solaris_2.5.1

      1) Exact steps to reproduce the problem
      Create a Calendar with locale=si (Slovenia) and print getFirstDayOfWeek(). It returns Sunday instead of Monday.

      2) Source Code that demonstrates the problem
            System.out.println ("First day of week for sl locale is " +
      Calendar.getInstance (new Locale ("sl")).getFirstDayOfWeek());
            System.out.println ("First day of week for sl_SI locale is " +
      Calendar.getInstance (new Locale ("sl", "SI")).getFirstDayOfWeek());
            System.out.println ("Calendar.SUNDAY = " + Calendar.SUNDAY + ", Mon = " + Calendar.MONDAY);

      Output:
      First day of week for sl locale is 1
      First day of week for sl_SI locale is 1
      Calendar.SUNDAY = 1, Mon = 2

            jennyh Jenny Huang (Inactive)
            mbykov Misha Bykov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: