public class DateType extends BaseDateTimeType
TemporalPrecisionEnum.YEAR
TemporalPrecisionEnum.MONTH
TemporalPrecisionEnum.DAY
| Modifier and Type | Field and Description |
|---|---|
static ca.uhn.fhir.model.api.TemporalPrecisionEnum |
DEFAULT_PRECISION
The default precision for this type
|
| Constructor and Description |
|---|
DateType()
Constructor
|
DateType(Calendar theCalendar)
Constructor which accepts a date value and uses the
DEFAULT_PRECISION for this type. |
DateType(Date theDate)
Constructor which accepts a date value and uses the
DEFAULT_PRECISION for this type |
DateType(Date theDate,
ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
Constructor which accepts a date value and a precision value.
|
DateType(int theYear,
int theMonth,
int theDay)
Constructor which accepts a date value and uses the
DEFAULT_PRECISION for this type. |
DateType(String theDate)
Constructor which accepts a date as a string in FHIR format
|
| Modifier and Type | Method and Description |
|---|---|
DateType |
copy() |
String |
fhirType() |
protected ca.uhn.fhir.model.api.TemporalPrecisionEnum |
getDefaultPrecisionForDatatype()
Returns the default precision for this datatype
|
boolean |
isDateTime() |
static DateType |
parseV3(String theV3String)
Creates a new instance by parsing an HL7 v3 format date time string
|
static InstantType |
today() |
add, after, before, dateTimeValue, encode, equalsUsingFhirPathRules, fpValue, getDay, getHour, getMillis, getMinute, getMonth, getNanos, getPrecision, getSecond, getTimeZone, getValueAsCalendar, getYear, hasTime, isTimeZoneZulu, isToday, parse, setDay, setHour, setMillis, setMinute, setMonth, setNanos, setPrecision, setSecond, setTimeZone, setTimeZoneZulu, setValue, setValue, setValueAsString, setValueAsV3String, setYear, toCalendar, toHumanDisplay, toHumanDisplayLocalTimezoneasStringValue, equalsDeep, equalsShallow, forceStringValue, fromStringValue, getProperty, getTypesForProperty, getValue, getValueAsString, hashCode, hasPrimitiveValue, hasValue, isEmpty, isPrimitive, makeProperty, primitiveValue, readExternal, setProperty, setProperty, toString, typedCopy, updateStringValue, writeExternaladdChild, addExtension, addExtension, addExtension, copyValues, getExtension, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionString, getId, getIdBase, getIdElement, getNamedProperty, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, listChildren, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElementcastToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isBooleanPrimitive, isMetadataBased, isResource, listChildrenByName, listChildrenByName, setUserData, setUserDataINNclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitgetFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserDatapublic static final ca.uhn.fhir.model.api.TemporalPrecisionEnum DEFAULT_PRECISION
public DateType()
public DateType(Date theDate)
DEFAULT_PRECISION for this typepublic DateType(Date theDate, ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
TemporalPrecisionEnum.YEAR
TemporalPrecisionEnum.MONTH
TemporalPrecisionEnum.DAY
ca.uhn.fhir.parser.DataFormatException - If the specified precision is not allowed for this typepublic DateType(String theDate)
ca.uhn.fhir.parser.DataFormatException - If the precision in the date string is not allowed for this typepublic DateType(Calendar theCalendar)
DEFAULT_PRECISION for this type.public DateType(int theYear, int theMonth, int theDay)
DEFAULT_PRECISION for this type.
Use caution when using this constructor: The month is 0-indexed but the day is 1-indexed
in order to match the bahaviour of the Java Calendar type.
theYear - The year, e.g. 2015theMonth - The month, e.g. 0 for JanuarytheDay - The day (1 indexed) e.g. 1 for the first day of the monthprotected ca.uhn.fhir.model.api.TemporalPrecisionEnum getDefaultPrecisionForDatatype()
getDefaultPrecisionForDatatype in class BaseDateTimeTypeDEFAULT_PRECISIONpublic DateType copy()
copy in class PrimitiveType<Date>public static InstantType today()
public static DateType parseV3(String theV3String)
public boolean isDateTime()
isDateTime in class BaseDateTimeTypeCopyright © 2014–2021 Health Level 7. All rights reserved.