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

UK and France: bad minimal days in first week

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: globalization
    • Labels:

      Description



      Name: sdR10048 Date: 10/28/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b25"
      JCK : 1.5
      Platform[s] : Solaris
      switch/Mode :
      JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
      Failing Test [s] :
      api/java_util/GregorianCalendar/index.html#Ctor[GregorianCalendar0009]


      Problem description
      ===================
      getMinimalDaysInFirstWeek returns wrong value for UK and France locales.
      According to ISO 8601 the valid numbers are 4, 4 accordingly.
      See some info at http://www.pjh2.de/datetime/weeknumber/wnd.php.

          
      Minimized test:
      ===============
      ------- J.java -------
      import java.util.*;

      public class J {

          public static void main(String[] args) {
              Locale locales[] = {Locale.UK, Locale.FRANCE};
              GregorianCalendar cal = null;

              for (int i=0; i<locales.length; i++) {
                  cal = new GregorianCalendar(locales[i]);
                  System.out.println(locales[i] + " : " +
                                     cal.getMinimalDaysInFirstWeek());
              }
          }
      }

      ------- end-of-J.java -------

      Minimized test output:
      ======================
      C:\TEMP\1>c:\java\bin\java -showversion J
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b25)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b25, mixed mode)

      en_GB : 1
      fr_FR : 1

      JCK test source location:
      ==========================
      /java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kcolfersunw Kieran Colfer (Inactive)
                Reporter:
                dsvsunw Dsv Dsv (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: