java.util.Date.setYear() does not recalc month, or date when going from 29-Feb-1992
(a leap year) to a non-leap year.
Steps To Reproduce
Compile and run the following code
import java.util.Date;
public class LeapYearTest
{
public static void main(String args[])
{
Date d = new Date(92, 01, 29);
System.out.println("29-Feb-92 " + d);
d.setYear(93);
System.out.println("Unknown Date: " + d);
}
}
(a leap year) to a non-leap year.
Steps To Reproduce
Compile and run the following code
import java.util.Date;
public class LeapYearTest
{
public static void main(String args[])
{
Date d = new Date(92, 01, 29);
System.out.println("29-Feb-92 " + d);
d.setYear(93);
System.out.println("Unknown Date: " + d);
}
}