JDK-4944756 : UK and France: bad minimal days in first week
  • Type: Bug
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 2003-10-28
  • Updated: 2003-11-11
  • Resolved: 2003-11-11
Related Reports
Duplicate :  
Relates :  
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

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

Comments
EVALUATION please evaluate and see if we can fix it for tiger. thx! ###@###.### 2003-11-05 ###@###.### 2003-11-11 This bug has already been fixed by the fix for bug 4518811 (Wrong WEEK_OF_YEAR in Locale de). here's the output of the test case in our PIT build: sr-edub03-02:/i18n/projects/JDK/Tiger/test_cases:$ java -version java version "1.5.0-beta" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-l10n-pit) Java HotSpot(TM) Server VM (build 1.5.0-beta-l10n-pit, mixed mode) sr-edub03-02:/i18n/projects/JDK/Tiger/test_cases:$ java Bug4944756 en_GB : 4 fr_FR : 4 Closing this bug as a duplicate.
11-06-2004