Bug 15162 - GregorianCalendar skips 2004 Feb 29
Summary: GregorianCalendar skips 2004 Feb 29
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 3.3.2
: P1 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-27 08:13 UTC by gccbugz
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gccbugz 2004-04-27 08:13:31 UTC
A simple program to create a GregorianCalendar with year=2004, month=1, day=29
gives 2004-Mar-1 instead of 2004-Feb-29
e.g.
SimpleDateFormat sdf = new SimpleDateFormat("yyyy MMMMM d HH:mm:ss");
GregorianCalendar gc = new GregorianCalendar(2004, 1, 29, 0, 0, 0);
System.out.println(sdf.format(gc.getTime()) + " " + gc.getTimeInMillis());

(Sun j2sdk 1.4.2 gives 2004-Feb-29)
Comment 1 Ranjit Mathew 2004-04-27 08:55:36 UTC
This bug is no longer valid for mainline. I do not have a 3.4 build.
Comment 2 Andrew Pinski 2004-04-27 11:34:58 UTC
This was fixed for 3.4.0.  I think it is a dup of another bug too.