查某月的天数

 

public static int getDaysOfMonth(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
    }

 

posted @ 2020-12-11 18:32  君子笑而不语  阅读(79)  评论(0编辑  收藏  举报