/** * Sets the value for this type using the given Java Date object as the time, and using the default precision for * this datatype (unless the precision is already set), as well as the local timezone as determined by the local operating * system. Both of these properties may be modified in subsequent calls if neccesary. */ @Override public BaseDateTimeDt setValue(Date theValue) { setValue(theValue, getPrecision()); return this; }
/** * Constructor * * @throws DataFormatException * If the specified precision is not allowed for this type */ public BaseDateTimeDt(Date theDate, TemporalPrecisionEnum thePrecision) { setValue(theDate, thePrecision); if (isPrecisionAllowed(thePrecision) == false) { throw new DataFormatException("Invalid date/time string (datatype " + getClass().getSimpleName() + " does not support " + thePrecision + " precision): " + theDate); } }
/** * Sets the value for this type using the given Java Date object as the time, and using the default precision for * this datatype (unless the precision is already set), as well as the local timezone as determined by the local operating * system. Both of these properties may be modified in subsequent calls if neccesary. */ @Override public BaseDateTimeDt setValue(Date theValue) { setValue(theValue, getPrecision()); return this; }
/** * Constructor * * @throws DataFormatException * If the specified precision is not allowed for this type */ public BaseDateTimeDt(Date theDate, TemporalPrecisionEnum thePrecision) { setValue(theDate, thePrecision); if (isPrecisionAllowed(thePrecision) == false) { throw new DataFormatException("Invalid date/time string (datatype " + getClass().getSimpleName() + " does not support " + thePrecision + " precision): " + theDate); } }