United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4082158 GregorianCalendar.roll
JDK-4082158 : GregorianCalendar.roll

Details
Type:
Bug
Submit Date:
1997-09-26
Status:
Closed
Updated Date:
1998-02-24
Project Name:
JDK
Resolved Date:
1998-02-24
Component:
core-libs
OS:
solaris_2.5.1,windows_95
Sub-Component:
java.util:i18n
CPU:
x86,sparc
Priority:
P3
Resolution:
Won't Fix
Affected Versions:
1.1.4,1.1.5
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description

Name: diC59631			Date: 09/26/97


GregorianCalendar c = new GregorianCalendar();
loop
	c.roll(GregorianCalendar.DATE,true);
end loop

This does not work over a month boundary.  It
fails to update the month.  (Rolling down does
the same thing.)  Therefore after August 31, we go
to August 1 instead of September 1.

I am using JavaWorkshop 2 and my classpath has 
jdk1.1.4/lib/classes.zip before the
JDK/lib/classes.zip
======================================================================

                                    

Comments
WORK AROUND



Name: diC59631			Date: 09/26/97



======================================================================
                                     
2004-06-11
EVALUATION

User error; the user is confusing the function of Calendar.roll() with Calendar.add().  The javadoc states clearly that Calendar.roll() does NOT change the value of the next larger field; that's why it's called ROLL.
-alanl
                                     
2004-06-11



Hardware and Software, Engineered to Work Together