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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringtoSimpleString(TemporalAccessor temporalAccessor) Creates a simple DTM representation of aTemporalAccessor.static ZonedDateTimeCreates aZonedDateTimeobject from the given string.
-
Constructor Details
-
HL7DTM
public HL7DTM()
-
-
Method Details
-
toZonedDateTime
Creates aZonedDateTimeobject 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
ZonedDateTimeobject, ornullif the parameter isnullor empty. - Throws:
DataTypeException- if the DTM string is invalid.
-
toSimpleString
Creates a simple DTM representation of aTemporalAccessor.- Parameters:
temporalAccessor- TheTemporalAccessorto convert (e.g.Instant,ZonedDateTime).- Returns:
- a string, or
nullif the parameter isnull.
-