Zoned Date Time Interval
A half-open interval of zoned date-times based on timeline order.
DateTime.MIN and DateTime.MAX are used as sentinels to indicate an unbounded (ie. infinite) start or end. A ZonedDateTime with either as the date-time component will be treated accordingly, regardless of the offset or time zone.
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
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 zone of the start date-time will be used.
Returns a random date within this interval using the supplied random number generator. The zone 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 zone 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 zone 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 an OffsetDateTimeInterval.