harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2947) [classlib][luni]GregorianCalendar.getLeastMaximum(Calendar.WEEK_OF_YEAR) always return 50
Date Mon, 08 Jan 2007 09:39:27 GMT
[classlib][luni]GregorianCalendar.getLeastMaximum(Calendar.WEEK_OF_YEAR) always return 50
-----------------------------------------------------------------------------------------

                 Key: HARMONY-2947
                 URL: https://issues.apache.org/jira/browse/HARMONY-2947
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Tony Wu


GregorianCalendar.getLeastMaximum(Calendar.WEEK_OF_YEAR) always return 50 in Harmony.
But spec says that is should take into consideration the current values of the getFirstDayOfWeek,
getMinimalDaysInFirstWeek, getGregorianChange and getTimeZone methods.

For example, following testcase fails on Harmony but passes on RI.

public void test() {
        Date date = new Date(Date.parse("Jan 1 00:00:01 GMT 2000"));
        GregorianCalendar gc = new GregorianCalendar();
        gc.setGregorianChange(date);
        gc.setMinimalDaysInFirstWeek(7);
        assertEquals(52, gc.getLeastMaximum(Calendar.WEEK_OF_YEAR));
    }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message