Instant Interval
A half-open interval between two instants.
Instant.MIN and Instant.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 InstantInterval with a TimeZone to create an equivalent ZonedDateTimeInterval where both endpoints are in zone.
Returns a random date within this interval using the default random number generator.
Returns a random date within this interval using the supplied random number generator.
Returns a random date within this interval using the default random number generator or null if the interval is empty or unbounded.
Returns a random date within this interval using the supplied random number generator or null if the interval is empty or unbounded.
Converts this interval to the equivalent DateTimeInterval when both endpoints are in zone.