[Bug java/15162] New: GregorianCalendar skips 2004 Feb 29

gccbugz at k1k2 dot com gcc-bugzilla@gcc.gnu.org
Tue Apr 27 08:13:00 GMT 2004


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)

-- 
           Summary: GregorianCalendar skips 2004 Feb 29
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gccbugz at k1k2 dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15162



More information about the Java-prs mailing list