Expand description
Handling of date, time, date-time ranges. Needed for range matching. Parsing into ranges happens via partial precision structures (DicomDate, DicomTime, DicomDatime) so ranges can handle null components in date, time, date-time values.
Structs§
- Date
Range - Represents a date range as two
Option<chrono::NaiveDate>
values. None means no upper or no lower bound for range is present. - Fail
OnAmbiguous Range - Fail on an attempt to parse an ambiguous date-time range.
- Ignore
Time Zone - Discard known (parsed) time-zone information. Retrieves a DateTimeRange::Naive.
- Time
Range - Represents a time range as two
Option<chrono::NaiveTime>
values. None means no upper or no lower bound for range is present. - ToKnown
Time Zone - Use time-zone information from the time-zone aware value. Retrieves a DateTimeRange::TimeZone.
- ToLocal
Time Zone - For the missing time-zone, use time-zone information of the local system clock. Retrieves a DateTimeRange::TimeZone.
Enums§
- Date
Time Range - Represents a date-time range, that can either be time-zone naive or time-zone aware. It is stored as two
Option<chrono::DateTime<FixedOffset>>
or twoOption<chrono::NaiveDateTime>
values. None means no upper or no lower bound for range is present. - Error
Traits§
- Ambiguous
DtRange Parser - The DICOM standard allows for parsing a date-time range
in which one DT value provides time-zone information
but the other one does not.
An example of this is the value
19750101-19800101+0200
. - AsRange
- The DICOM protocol accepts date (DA) / time (TM) / date-time (DT) values with null components.
Functions§
- parse_
date_ range - Looks for a range separator ‘-’.
Returns a
DateRange
. - parse_
datetime_ range - Looks for a range separator ‘-’.
Returns a
DateTimeRange
. - parse_
datetime_ range_ custom - Same as parse_datetime_range() but allows for custom handling of ambiguous Date-time ranges. See AmbiguousDtRangeParser.
- parse_
datetime_ range_ impl - parse_
time_ range - Looks for a range separator ‘-’.
Returns a
TimeRange
.