[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.setGregorianChange(date);
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
|