TimeRange
class TimeRange
kotlin.Any | |
↳ | androidx.wear.complications.data.TimeRange |
A range of time, that may be unbounded on either side.
Summary
Public methods | |
---|---|
operator Boolean |
Returns whether the TimeRange contains a given point in time. |
Companion functions | |
---|---|
TimeRange |
Constructs a time range after a given point in time. |
TimeRange |
Constructs a time range until a given point in time. |
TimeRange |
Constructs a time range between two points in time, inclusive of the points themselves. |
Properties | |
---|---|
Long | |
Long |
Companion properties | |
---|---|
TimeRange |
The TimeRange that includes every point in time. |
Public methods
contains
operator fun contains(dateTimeMillis: Long): Boolean
Returns whether the TimeRange contains a given point in time.
Properties
endDateTimeMillis
val endDateTimeMillis: Long
startDateTimeMillis
val startDateTimeMillis: Long
Companion functions
after
@JvmStatic fun after(startDateTimeMillis: Long): TimeRange
Constructs a time range after a given point in time.
before
@JvmStatic fun before(endDateTimeMillis: Long): TimeRange
Constructs a time range until a given point in time.
between
@JvmStatic fun between(
startDateTimeMillis: Long,
endDateTimeMillis: Long
): TimeRange
Constructs a time range between two points in time, inclusive of the points themselves.