public static int getDaysOfMonth(int year, int month) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(year, month - 1, 1);
        return calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
    }
public static int getDaysOfMonth(int year, int month) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(year, month - 1, 1);
        return calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
    }
public static int getDaysOfMonth ( int year , int month ) { Calendar calendar = Calendar . getInstance ( ) ; calendar . set ( year , month - 1 , 1 ) ; return calendar . getActualMaximum ( Calendar . DAY_OF_MONTH ) ; }
获取某年某月的天数

@param year
int 年
@param month
int 月份[1-12] 月
@return int 指定年月的天数
获取某年某月的天数