Offset Date Time Interval
A half-open interval between two offset date-times based on timeline order.
DateTime.MIN and DateTime.MAX are used as sentinels to indicate an unbounded (ie. infinite) start or end. An OffsetDateTime with either as the date-time component will be treated accordingly, regardless of the offset.
Constructors
Types
Functions
Checks if this interval's end is bounded, meaning it has a finite value.
Checks if this interval's start is bounded, meaning it has a finite value.
Checks if this interval's end is unbounded. In ISO-8601 terminology, this is an "open" end.
Checks if this interval's start is unbounded. In ISO-8601 terminology, this is an "open" start.
Checks if both the start and end of this interval are unbounded, meaning this is an infinite time period in both directions.
Properties
Extensions
Converts this interval to an equivalent ZonedDateTimeInterval where both endpoints are given a fixed-offset time zone.
The number of whole centuries between the start and end of this interval.
The number of whole days between the start and end of this interval.
The number of whole decades between the start and end of this interval.
The number of whole months between the start and end of this interval.
The number of whole weeks between the start and end of this interval.
The number of whole years between the start and end of this interval.
Returns a random date within this interval using the default random number generator. The offset of the start date-time will be used.
Returns a random date within this interval using the supplied random number generator. The offset of the start date-time will be used.
Returns a random date within this interval using the default random number generator or null if the interval is empty or unbounded. The offset of the start date-time will be used.
Returns a random date within this interval using the supplied random number generator or null if the interval is empty or unbounded. The offset of the start date-time will be used.
Returns this interval with the precision reduced to just the date.
Returns this interval with the precision reduced to only the local date and time.
Converts this interval to an InstantInterval.
Converts this interval to a ZonedDateTimeInterval using the specified strategy to adjust each endpoint to a valid date, time, and offset in zone.