/** * Returns the days between two dates. Positive values indicate that * the second date is after the first, and negative values indicate, well, * the opposite. Relying on specific times is problematic. * * @param early the "first date" * @param late the "second date" * @return the days between the two dates * @deprecated */ public static final int daysBetween(Date early, Date late) { Calendar c1 = Calendar.getInstance(); Calendar c2 = Calendar.getInstance(); c1.setTime(early); c2.setTime(late); return daysBetween(c1, c2); }
/** * Returns the days between two dates. Positive values indicate that * the second date is after the first, and negative values indicate, well, * the opposite. Relying on specific times is problematic. * * @param early the "first date" * @param late the "second date" * @return the days between the two dates * @deprecated */ public static final int daysBetween(Date early, Date late) { Calendar c1 = Calendar.getInstance(); Calendar c2 = Calendar.getInstance(); c1.setTime(early); c2.setTime(late); return daysBetween(c1, c2); }