请看说明文档:
里面有这么一个方法.
isLeapYear
public boolean isLeapYear(int year)Determines if the given year is a leap year. Returns true if the given year is a leap year. Parameters:
year - the given year.
Returns:
true if the given year is a leap year; false otherwise.Leap Year 为闰年的意思.
里面有这么一个方法.
isLeapYear
public boolean isLeapYear(int year)Determines if the given year is a leap year. Returns true if the given year is a leap year. Parameters:
year - the given year.
Returns:
true if the given year is a leap year; false otherwise.Leap Year 为闰年的意思.
Calendar cal=Calendar.getInstance();
try{
cal.setTime(sdf.parse("2002-07-31"));
}catch(Exception e){};
cal.add(Calendar.MONTH,+19);//一年加七月
System.out.println(sdf.format(cal.getTime()));//2004.02.29