TimePointInterval

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

A half-open interval of time points.

Functions

contains
Link copied to clipboard
common
open operator override fun contains(value: T): Boolean

Checks if this interval contains value.

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

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

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

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

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

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

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

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

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

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

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

Checks if this interval is empty.

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

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

Properties

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

The end of this interval, exclusive.

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

The end of this interval, inclusive.

start
Link copied to clipboard
common
open override val start: T

The start of this interval, inclusive.

Inheritors

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

Extensions

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

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

lengthInHours
Link copied to clipboard
common
val TimePointInterval<*>.lengthInHours: Hours

The number of whole hours between the start and end of this interval.

lengthInMicroseconds
Link copied to clipboard
common
val TimePointInterval<*>.lengthInMicroseconds: Microseconds

The number of whole microseconds between the start and end of this interval.

lengthInMilliseconds
Link copied to clipboard
common
val TimePointInterval<*>.lengthInMilliseconds: Milliseconds

The number of whole milliseconds between the start and end of this interval.

lengthInMinutes
Link copied to clipboard
common
val TimePointInterval<*>.lengthInMinutes: Minutes

The number of whole minutes between the start and end of this interval.

lengthInNanoseconds
Link copied to clipboard
common
val TimePointInterval<*>.lengthInNanoseconds: Nanoseconds

The number of nanoseconds between the start and end of this interval.

lengthInSeconds
Link copied to clipboard
common
val TimePointInterval<*>.lengthInSeconds: Seconds

The number of whole seconds between the start and end of this interval.

toDuration
Link copied to clipboard
common
fun TimePointInterval<*>.toDuration(): Duration

Converts this interval into a Duration of the same length.

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

Converts this interval to an equivalent NSDateInterval.

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

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