/** * Returns a {@link Comparison} between the result of * the second specified date and the first specified date. The default * rendering of that Comparison will be the largest unit difference * between the dates. * * @param now The date to use as representative of "now" * @param then The secondary date * @return {@link Comparison} object */ public Comparison difference(Object now, Object then) { return compare(now, then, DIFF_TYPE); }
/** * Returns a {@link Comparison} between the second specified date * and the first specified date. The default * rendering of that Comparison will be the largest unit difference * between the dates followed by a description of their relative position. * * @param now The date to use as representative of "now" * @param then The date in question * @return {@link Comparison} object */ public Comparison whenIs(Object now, Object then) { return compare(now, then, RELATIVE_TYPE); }
/** * Returns a {@link Comparison} between the result of * {@link #getCalendar()} and the specified date. The default * rendering of that Comparison will be the largest unit difference * between the dates followed by a description of their relative position. * * @param then The date in question * @return {@link Comparison} object */ public Comparison whenIs(Object then) { return compare(getCalendar(), then, CURRENT_TYPE); }