Expand description
Timestamp parsing and utilities to translate to and from the chrono and
time crates.
Modules§
- chrono
- Utilies to convert back and forth between chrono’s data structures and the hl7-parser ones
All implementations here are implemented as
TryFromandFromtraits between theTimeStampstruct and variouschronotypes. This allows for easy conversion between the two types. TheTryFromimplementations will return an error if the conversion is not possible, such as if the date or time components are invalid. TheFromimplementations will always succeed and will set missing components to zero or the epoch if necessary. - jiff
- Utilies to convert back and forth between jiff’s data structures and the hl7-parser ones
All implementations here are implemented as
TryFromandFromtraits between theTimeStampstruct and variouschronotypes. This allows for easy conversion between the two types. TheTryFromimplementations will return an error if the conversion is not possible, such as if the date or time components are invalid. TheFromimplementations will always succeed and will set missing components to zero or the epoch if necessary. - time_
crate - Utilies to convert back and forth between time’s data structures and the hl7-parser ones
All implementations here are implemented as
TryFromandFromtraits between theTimeStampstruct and varioustimetypes. This allows for easy conversion between the two types. TheTryFromimplementations will return an error if the conversion is not possible, such as if the date or time components are invalid. TheFromimplementations will always succeed and will set missing components to zero or the epoch if necessary.
Structs§
- Date
- A parsed date without a time component
- Time
- The results of parsing a timestamp. Note that the timestamp is not validated, i.e. it may not be a valid date or time.
- Time
Stamp - The results of parsing a timestamp. Note that the timestamp is not validated, i.e. it may not be a valid date or time.
- Time
Stamp Offset - A parsed timezone offset in hours and minutes
Enums§
- Date
Time Parse Error - Errors that can result from parsing HL7 timestamps
- Errored
Date Time Component
Traits§
- Date
Time - Trait for parsing HL7 date and time strings into
Date,Time, andTimeStampstructs
Functions§
- parse_
date - Parse an HL7 date in the format:
YYYY[MM[DD] - parse_
time - Parse an HL7 time in the format:
HH[MM[SS[.S[S[S[S]]]]]][+/-ZZZZ] - parse_
timestamp - Parse an HL7 timestamp in the format:
YYYY[MM[DD[HH[MM[SS[.S[S[S[S]]]]]]]]][+/-ZZZZ]