Offset Date Time Interval
class OffsetDateTimeInterval(start: OffsetDateTime, endExclusive: OffsetDateTime) : TimePointInterval<OffsetDateTime>
Content copied to clipboard
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
OffsetDateTimeInterval
Link copied to clipboard
fun OffsetDateTimeInterval(start: OffsetDateTime = UNBOUNDED.start, endExclusive: OffsetDateTime = UNBOUNDED.endExclusive)
Content copied to clipboard
Types
Functions
asDuration
Link copied to clipboard
contains
Link copied to clipboard
hasBoundedEnd
Link copied to clipboard
hasBoundedStart
Link copied to clipboard
hasUnboundedEnd
Link copied to clipboard
hasUnboundedStart
Link copied to clipboard
isUnbounded
Link copied to clipboard
Properties
endExclusive
Link copied to clipboard
endInclusive
Link copied to clipboard
lengthInDays
Link copied to clipboard
lengthInHours
Link copied to clipboard
lengthInMicroseconds
Link copied to clipboard
lengthInMilliseconds
Link copied to clipboard
lengthInMinutes
Link copied to clipboard
lengthInMonths
Link copied to clipboard
lengthInNanoseconds
Link copied to clipboard
lengthInSeconds
Link copied to clipboard
lengthInWeeks
Link copied to clipboard
lengthInYears
Link copied to clipboard
start
Link copied to clipboard
Extensions
asZonedDateTimeInterval
Link copied to clipboard
fun OffsetDateTimeInterval.asZonedDateTimeInterval(): ZonedDateTimeInterval
Content copied to clipboard
Converts this interval to an equivalent ZonedDateTimeInterval where both endpoints are given a fixed-offset time zone.
random
Link copied to clipboard
randomOrNull
Link copied to clipboard
toDateRange
Link copied to clipboard
toDateTimeInterval
Link copied to clipboard
toInstantInterval
Link copied to clipboard
toZonedDateTimeInterval
Link copied to clipboard
fun OffsetDateTimeInterval.toZonedDateTimeInterval(zone: TimeZone, strategy: OffsetConversionStrategy): ZonedDateTimeInterval
Content copied to clipboard
Converts this interval to a ZonedDateTimeInterval using the specified strategy to adjust each endpoint to a valid date, time, and offset in zone.