Java Calendar
Calendar cal = Calendar.getInstance();
获取最大月
cal.getActualMaximum(Calendar.DAY_OF_MONTH)
获取今天
Calendar.getInstance().getTime();
判断是否为周末
cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY
JS
new Date(y, m, 0).getDate();