/** * Returns the month as an integer. */ public int getMonth() { int month = 0; if (dt != null) { month = dt.getMonth(); } //end if return month; } //end method
/** * Returns the month as an integer. */ public int getMonth() { int month = 0; if (dt != null) { month = dt.getMonth(); } //end if return month; } //end method
/** * Returns the month 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 getMonth() throws DataTypeException { return getDetail().getMonth(); }
/** * Returns the month 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 getMonth() throws DataTypeException { return getDetail().getMonth(); }
/** * 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; }