/** * Returns a {@link Date} derived from the result of {@link #getCalendar} * * @return a {@link Date} derived from the result of {@link #getCalendar} */ public Date getDate() { return getCalendar().getTime(); }
/** * @return the month value of the date returned by {@link #getCalendar()}. * * @since VelocityTools 1.2 */ public Integer getMonth() { return getMonth(getCalendar()); }
/** * @return the year value of the date returned by {@link #getCalendar()}. * * @since VelocityTools 1.2 */ public Integer getYear() { return getYear(getCalendar()); }
/** * @param field target field * @return the specified value of the date returned by * {@link #getCalendar()} or null if the field is invalid. * * @since VelocityTools 1.2 */ public Integer getValue(Object field) { return getValue(field, getCalendar()); }
/** * @return the day (of the month) value of the date * returned by {@link #getCalendar()}. * <br><br> * NOTE: Unlike java.util.Date, this returns the day of the month. * It is equivalent to Date.getDate() and * Calendar.get(Calendar.DAY_OF_MONTH). We could not call this method * getDate() because that already exists in this class with a different * function. * * @since VelocityTools 1.2 */ public Integer getDay() { return getDay(getCalendar()); }