class TimeRange


A range of time, that may be unbounded on either side.

Summary

Public companion functions

TimeRange
after(startInstant: Instant)

Constructs a time range after a given point in time.

TimeRange
before(endInstant: Instant)

Constructs a time range until a given point in time.

TimeRange
between(startInstant: Instant, endInstant: Instant)

Constructs a time range between two points in time, inclusive of the points themselves.

Public companion properties

TimeRange

The TimeRange that includes every point in time.

Public functions

operator Boolean
contains(dateTimeMillis: Instant)

Returns whether the TimeRange contains a given point in time.

open operator Boolean
equals(other: Any?)
open Int
open String

Public companion functions

after

Added in 1.0.0
fun after(startInstant: Instant): TimeRange

Constructs a time range after a given point in time.

before

Added in 1.0.0
fun before(endInstant: Instant): TimeRange

Constructs a time range until a given point in time.

between

Added in 1.0.0
fun between(startInstant: Instant, endInstant: Instant): TimeRange

Constructs a time range between two points in time, inclusive of the points themselves.

Public companion properties

ALWAYS

val ALWAYS: TimeRange

The TimeRange that includes every point in time.

Public functions

contains

Added in 1.0.0
operator fun contains(dateTimeMillis: Instant): Boolean

Returns whether the TimeRange contains a given point in time.

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

endDateTimeMillis

Added in 1.0.0
val endDateTimeMillis: Instant

startDateTimeMillis

Added in 1.0.0
val startDateTimeMillis: Instant