1 /** 2 * 获取本月最后一天23点59分59秒 3 * @param date 4 * @return 5 */ 6 public static Date getLastMonthDay(Date date) { 7 Calendar cal = Calendar.getInstance(); 8 cal.setTime(date); 9 int maxDate = cal.getActualMaximum(Calendar.DAY_OF_MONTH);10 cal.set(Calendar.DATE, maxDate);11 12 SimpleDateFormat s=new SimpleDateFormat("yyyy-MM-dd 23:59:59");13 String curDate = s.format(cal.getTime()); 14 return sendDate("yyyy-MM-dd HH:mm:ss",curDate);15 }