Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.MONTH,11);
calendar.set(Calendar.DATE,calendar.getActualMaximum(Calendar.DAY_OF_MONTH));//获取月份的最后一天
calendar.set(Calendar.HOUR,23);
calendar.set(Calendar.MINUTE,59);
calendar.set(Calendar.SECOND,59);
https://www.leftso.com/article/528.html