/** * Determines if this date and the specified date represent the same month, eg both dates are for the * March. */ public boolean sameMonthAs(final Date as) { return sameAs(as, Calendar.MONTH); }
/** * Determines if this date and the specified date represent the same day of the month, eg both dates are * for the 3rd. */ public boolean sameDayOfMonthAs(final Date as) { return sameAs(as, Calendar.DAY_OF_MONTH); }
/** * Determines if this date and the specified date represent the same day of the week, eg both dates are on * a Tuesday. */ public boolean sameDayOfWeekAs(final Date as) { return sameAs(as, Calendar.DAY_OF_WEEK); }
/** * Determines if this date and the specified date represent the same day of the year, eg both dates are * for the 108th day of the year. */ public boolean sameDayOfYearAs(final Date as) { return sameAs(as, Calendar.DAY_OF_YEAR); }
/** * Determines if this date and the specified date represent the same week in the year, eg both dates are * the for the 18th week of the year. */ public boolean sameWeekAs(final Date as) { return sameAs(as, Calendar.WEEK_OF_YEAR); }
/** * Determines if this date and the specified date represent the same year. */ public boolean sameYearAs(final Date as) { return sameAs(as, Calendar.YEAR); }