TimePointInterval

A half-open interval of time points.

abstract class TimePointInterval<T : TimePoint<T>> : Interval<T>

Functions

asDuration
Link copied to clipboard
common

Converts this interval into a Duration of the same length.

fun asDuration(): Duration
contains
Link copied to clipboard
common

Checks if this interval contains value.

open operator override fun contains(value: T): Boolean
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hasBoundedEnd
Link copied to clipboard
common

Checks if this interval's end is bounded, meaning it has a finite value.

open override fun hasBoundedEnd(): Boolean
hasBoundedStart
Link copied to clipboard
common

Checks if this interval's start is bounded, meaning it has a finite value.

open override fun hasBoundedStart(): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
hasUnboundedEnd
Link copied to clipboard
common

Checks if this interval's end is unbounded. In ISO-8601 terminology, this is an "open" end.

abstract override fun hasUnboundedEnd(): Boolean
hasUnboundedStart
Link copied to clipboard
common

Checks if this interval's start is unbounded. In ISO-8601 terminology, this is an "open" start.

abstract override fun hasUnboundedStart(): Boolean
isBounded
Link copied to clipboard
common

Checks if both the start and end of this interval are bounded, meaning it has a finite range.

open override fun isBounded(): Boolean
isEmpty
Link copied to clipboard
common

Checks if this interval is empty.

open override fun isEmpty(): Boolean
isUnbounded
Link copied to clipboard
common

Checks if both the start and end of this interval are unbounded, meaning this is an infinite time period in both directions.

open override fun isUnbounded(): Boolean
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

endExclusive
Link copied to clipboard
common

The end of this interval, exclusive.

open override val endExclusive: T
endInclusive
Link copied to clipboard
common

The end of this interval, inclusive.

open override val endInclusive: T
lengthInDays
Link copied to clipboard
common

The number of 24-hour days in this interval.

open val lengthInDays: LongDays
lengthInHours
Link copied to clipboard
common

The number of whole hours in this interval.

val lengthInHours: LongHours
lengthInMicroseconds
Link copied to clipboard
common

The number of whole microseconds in this interval.

val lengthInMicroseconds: LongMicroseconds
lengthInMilliseconds
Link copied to clipboard
common

The number of whole milliseconds in this interval.

val lengthInMilliseconds: LongMilliseconds
lengthInMinutes
Link copied to clipboard
common

The number of whole minutes in this interval.

val lengthInMinutes: LongMinutes
lengthInNanoseconds
Link copied to clipboard
common

The number of whole nanoseconds in this interval.

val lengthInNanoseconds: LongNanoseconds
lengthInSeconds
Link copied to clipboard
common

The number of whole seconds in this interval.

val lengthInSeconds: LongSeconds
start
Link copied to clipboard
common

The start of this interval, inclusive.

open override val start: T

Inheritors

InstantInterval
Link copied to clipboard
common
OffsetDateTimeInterval
Link copied to clipboard
common
ZonedDateTimeInterval
Link copied to clipboard
common

Extensions

contains
Link copied to clipboard
common

Checks if this interval contains value. This will always return false if value is null.

operator fun <T : TimePoint<T>> TimePointInterval<T>.contains(value: TimePoint<*>?): Boolean
toNSDateInterval
Link copied to clipboard
darwin

Converts this interval to an equivalent NSDateInterval.

fun <T : TimePoint<T>> TimePointInterval<T>.toNSDateInterval(): <ERROR CLASS>
toNSDateIntervalOrNull
Link copied to clipboard
darwin

Converts this interval to an equivalent NSDateInterval, or null if the interval is unbounded.

fun <T : TimePoint<T>> TimePointInterval<T>.toNSDateIntervalOrNull(): <ERROR CLASS>?