public class DateTimeDt extends BaseDateTimeDt
Modifier and Type | Field and Description |
---|---|
static TemporalPrecisionEnum |
DEFAULT_PRECISION
The default precision for this type
|
Constructor and Description |
---|
DateTimeDt()
Constructor
|
DateTimeDt(Date theDate)
Create a new DateTimeDt with seconds precision and the local time zone
|
DateTimeDt(Date theDate,
TemporalPrecisionEnum thePrecision)
Constructor which accepts a date value and a precision value.
|
DateTimeDt(Date theDate,
TemporalPrecisionEnum thePrecision,
TimeZone theTimezone)
Constructor which accepts a date value, precision value, and time zone.
|
DateTimeDt(String theValue)
Create a new instance using a string date/time
|
Modifier and Type | Method and Description |
---|---|
protected TemporalPrecisionEnum |
getDefaultPrecisionForDatatype()
Returns the default precision for this datatype
|
protected boolean |
isPrecisionAllowed(TemporalPrecisionEnum thePrecision)
To be implemented by subclasses to indicate whether the given precision is allowed by this type
|
static DateTimeDt |
withCurrentTime()
Returns a new instance of DateTimeDt with the current system time and SECOND precision and the system local time
zone
|
encode, getDay, getHour, getMillis, getMinute, getMonth, getNanos, getPrecision, getSecond, getTimeZone, getValueAsCalendar, getYear, isTimeZoneZulu, isToday, parse, setDay, setHour, setMillis, setMinute, setMonth, setNanos, setPrecision, setSecond, setTimeZone, setTimeZoneZulu, setValue, setValue, setValueAsString, setYear, toHumanDisplay, toHumanDisplayLocalTimezone
equals, getValue, getValueAsString, hashCode, isEmpty, readExternal, toString, updateStringValue, writeExternal
getElementSpecificId, getId, setElementSpecificId, setId, setId
addUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, hasFormatComment, isBaseEmpty
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFormatCommentsPost, getFormatCommentsPre, hasFormatComment
public static final TemporalPrecisionEnum DEFAULT_PRECISION
public DateTimeDt()
public DateTimeDt(Date theDate)
public DateTimeDt(Date theDate, TemporalPrecisionEnum thePrecision)
DataFormatException
- If the specified precision is not allowed for this typepublic DateTimeDt(String theValue)
DataFormatException
- If the specified precision is not allowed for this typepublic DateTimeDt(Date theDate, TemporalPrecisionEnum thePrecision, TimeZone theTimezone)
protected boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision)
BaseDateTimeDt
isPrecisionAllowed
in class BaseDateTimeDt
public static DateTimeDt withCurrentTime()
protected TemporalPrecisionEnum getDefaultPrecisionForDatatype()
getDefaultPrecisionForDatatype
in class BaseDateTimeDt
DEFAULT_PRECISION
Copyright © 2014–2019 University Health Network. All rights reserved.