Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.MONTH, month - 1); //月份要-1,因为Calendar中一到十二月是0-11
calendar.set(Calendar.DATE, 1);
int maxDay = calendar.getActualMaximum(Calendar.DATE);
标签:set,Java,天数,DATE,Calendar,calendar
From: https://www.cnblogs.com/eaglex3/p/16799091.html