/** * Returns the day as an integer. */ public int getDay() { int day = 0; if (dt != null) { day = dt.getDay(); } //end if return day; } //end method
/** * Returns the day as an integer. */ public int getDay() { int day = 0; if (dt != null) { day = dt.getDay(); } //end if return day; } //end method
/** * Returns the day as an integer. * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public int getDay() throws DataTypeException { return getDetail().getDay(); } }
/** * Returns the day as an integer. * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public int getDay() throws DataTypeException { return getDetail().getDay(); } }
/** * Return the value as a calendar object * @since 1.1 */ public Calendar getValueAsCalendar() { Calendar retVal = Calendar.getInstance(); retVal.set(Calendar.DATE, getDay()); retVal.set(Calendar.MONTH, getMonth() - 1); retVal.set(Calendar.YEAR, getYear()); // Truncate retVal.set(Calendar.HOUR_OF_DAY, 0); retVal.set(Calendar.MINUTE, 0); retVal.set(Calendar.SECOND, 0); retVal.set(Calendar.MILLISECOND, 0); return retVal; }
/** * Return the value as a calendar object * @since 1.1 */ public Calendar getValueAsCalendar() { Calendar retVal = Calendar.getInstance(); retVal.set(Calendar.DATE, getDay()); retVal.set(Calendar.MONTH, getMonth() - 1); retVal.set(Calendar.YEAR, getYear()); // Truncate retVal.set(Calendar.HOUR_OF_DAY, 0); retVal.set(Calendar.MINUTE, 0); retVal.set(Calendar.SECOND, 0); retVal.set(Calendar.MILLISECOND, 0); return retVal; }