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-3003) [classlib][luni]GregorianCalendar.get(Calendar.DAY_OF_MONTH) and get(Calendar.MONTH) return incorrect value
Date Mon, 15 Jan 2007 06:41:27 GMT
[classlib][luni]GregorianCalendar.get(Calendar.DAY_OF_MONTH) and get(Calendar.MONTH) return
incorrect value

                 Key: HARMONY-3003
                 URL: https://issues.apache.org/jira/browse/HARMONY-3003
             Project: Harmony
          Issue Type: Bug
            Reporter: Tony Wu
            Priority: Trivial

methods get(Calendar.DAY_OF_MONTH) and get(Calendar.MONTH) return incorrect value in the year
at which the calendar changed to gregorian.
following testcase illustrates this problem

 public void test() {
        Date date = new Date(Date.parse("Feb 28 00:00:01 GMT 2000"));
        GregorianCalendar gc = new GregorianCalendar();
        gc.setTimeInMillis(Date.parse("Dec 1 00:00:01 GMT 2000"));
        assertEquals(1, gc.get(Calendar.DAY_OF_MONTH));
        assertEquals(11, gc.get(Calendar.MONTH));

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


View raw message