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

First day of the week is Monday in Croatia and not Sunday.

XMLWordPrintable

      FULL PRODUCT VERSION :
      1.4.2_07-b05
      1.5.0_02

      ADDITIONAL OS VERSION INFORMATION :
      Windows 2000, Windows 2003

      A DESCRIPTION OF THE PROBLEM :
      According with ISO standards first day of week is Monday for Croatia and not Sunday as java returns.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Set default locale to HR_HR and just print
      Calendar.getInstance().getFirstDayOfWeek()
      It will return Calendar.SUNDAY and not Calendar.MONDAY.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      my piece of code (see "Source code for an executable test case") should return 2 (Calendar.Monday)

      HR_HR = 2

      ACTUAL -
      Calendar.SUNDAY = 1

      HR_HR = 1



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      ====start of source code=======

      Locale.setDefault(new Locale("HR", "HR"));
      System.out.println("HR_HR = "+Calendar.getInstance().getFirstDayOfWeek());

      ====end of source code=======

      ---------- END SOURCE ----------

            asaha Abhijit Saha
            okutsu Masayoshi Okutsu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: