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 }
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 }