Date Range
An inclusive range of dates.
Date.MIN and Date.MAX are used as sentinels to indicate an unbounded (ie. infinite) start or end.
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
Combines this DateRange with a TimeZone to create a ZonedDateTimeInterval between the start of the first day and the end of the last day in zone.
The number of whole centuries between the start and end of this range.
The number of days between the start and end of this range. A range is inclusive, so if the start and end date are the same, the length will be one day.
The number of whole decades between the start and end of this range.
The number of whole months between the start and end of this range.
The number of whole weeks between the start and end of this range.
The number of whole years between the start and end of this range.
Returns a random date within this range using the default random number generator or null if the interval is empty or unbounded.
Returns a random date within this range using the supplied random number generator or null if the interval is empty or unbounded.
Converts this range to an InstantInterval between the start of the first day and the end of the last day in zone.