Class HL7DTM
java.lang.Object
org.openehealth.ipf.commons.ihe.core.HL7DTM
HL7 timestamps (data type DTM) with particular precision, normalized to UTC. It's the usual date format used by IHE.
- Since:
- 4.1
- Author:
- Dmytro Rud
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
toSimpleString
(TemporalAccessor temporalAccessor) Creates a simple DTM representation of aTemporalAccessor
.static ZonedDateTime
Creates aZonedDateTime
object from the given string.
-
Constructor Details
-
HL7DTM
public HL7DTM()
-
-
Method Details
-
toZonedDateTime
Creates aZonedDateTime
object from the given string.- Parameters:
s
- String of the patternYYYY[MM[DD[HH[MM[SS[.S[S[S[S]]]]]]]]][+/-ZZZZ]
. Milliseconds will be ignored.- Returns:
- a
ZonedDateTime
object, ornull
if the parameter isnull
or empty. - Throws:
DataTypeException
- if the DTM string is invalid.
-
toSimpleString
Creates a simple DTM representation of aTemporalAccessor
.- Parameters:
temporalAccessor
- TheTemporalAccessor
to convert (e.g.Instant
,ZonedDateTime
).- Returns:
- a string, or
null
if the parameter isnull
.
-