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

Regression: Calendar.getFirstDayOfWeek() returns wrong value in Ukraine locale

XMLWordPrintable

      SYNOPSIS
      --------
      Regression: Calendar.getFirstDayOfWeek() returns wrong value in Ukraine locale

      OPERATING SYSTEM
      ----------------
      All

      FULL JDK VERSION
      ----------------
      Reproducible with Java 6 and JDK 7
      Not reproducible with 5.0/1.4.2

      REPRODUCTION INSTRUCTIONS
      -------------------------
      Compile and run the attached testcase

      Observed result
         Output is "1"

      Expected result
         Output should be "2"
         (in the Ukraine Monday is the first day of the week)

      This same problem was apparently fixed in 1.4.1 under CR 4527203, but the problem seems to have been reintroduced in Java 6.

      TESTCASE
      --------
      import java.util.*;

      public class MinDays {
          public static void main(String[] args) {
              Calendar cal = Calendar.getInstance(new Locale("ua", "UA"));
              System.out.println(cal.getFirstDayOfWeek());
          }
      }

            Unassigned Unassigned
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: