Sorry, shouldn't have opened this. I tested on 1.1.3. This is fixed in 1.1.4
Name: diC59631 Date: 10/08/97
import java.util.*;
class ch {
public static void main (String args[]) {
Date d = new Date(97,6,25);
Calendar cal = Calendar.getInstance();
cal.setTime(d);
System.out.println(cal.getTime());
//cal.computeFields();
System.out.println(cal.get(Calendar.DAY_OF_WEEK));
cal.roll(Calendar.DATE, true);
System.out.println(cal.getTime());
System.out.println(cal.get(Calendar.DAY_OF_WEEK));
}
}
======================================================================
Name: diC59631 Date: 10/08/97
import java.util.*;
class ch {
public static void main (String args[]) {
Date d = new Date(97,6,25);
Calendar cal = Calendar.getInstance();
cal.setTime(d);
System.out.println(cal.getTime());
//cal.computeFields();
System.out.println(cal.get(Calendar.DAY_OF_WEEK));
cal.roll(Calendar.DATE, true);
System.out.println(cal.getTime());
System.out.println(cal.get(Calendar.DAY_OF_WEEK));
}
}
======================================================================
- relates to
-
JDK-4082158 GregorianCalendar.roll
-
- Closed
-