计算2天的日期差

1 public static int getIntervalDays(Date date, Date otherDate) {
2     long time = Math.abs(new LocalDate(date).toDate().getTime() - new LocalDate(otherDate).toDate().getTime());
3     return (int) time / (24 * 60 * 60 * 1000);
4 }
原文地址:https://www.cnblogs.com/wihainan/p/6237567.html