获取两个日期(不含时分秒)相差的天数,不包含今天
/**
* 获取两个日期(不含时分秒)相差的天数,不包含今天
*
* @param startDate
* @param endDate
* @throws ParseException
* @return
*/
public static int dateBetween(Date startDate, Date endDate) throws ParseException {
Date dateStart = dateParse(dateFormat(startDate, DATE_PATTERN), DATE_PATTERN);
Date dateEnd = dateParse(dateFormat(endDate, DATE_PATTERN), DATE_PATTERN);
return (int) ((dateEnd.getTime() - dateStart.getTime()) / 1000 / 60 / 60 / 24);
}