Function dicom_core::value::range::parse_datetime_range
source · pub fn parse_datetime_range(
buf: &[u8],
dt_utc_offset: FixedOffset
) -> Result<DateTimeRange, Error>Expand description
Looks for a range separator ‘-’.
Returns a DateTimeRange.
Users are advised, that for very specific inputs, inconsistent behavior can occur.
This behavior can only be produced when all of the following is true:
- two very short date-times in the form of YYYY are presented
- both YYYY values can be exchanged for a valid west UTC offset, meaning year <= 1200
- only one west UTC offset is presented.
In such cases, two ‘-’ characters are present and the parser will favor the first one,
if it produces a valid
DateTimeRange. Otherwise, it tries the second one.