Companion

object Companion

Properties

MAX
Link copied to clipboard
common
val MAX: Duration

The maximum supported Duration.

MIN
Link copied to clipboard
common
val MIN: Duration

The minimum supported Duration.

ZERO
Link copied to clipboard
common
val ZERO: Duration

A Duration of zero length.

Extensions

between
Link copied to clipboard
common
fun Duration.Companion.between(start: DateTime, endExclusive: DateTime): Duration

Returns the Duration between two date-times, which are assumed to be at the same UTC offset. In general, it's more appropriate to calculate duration using Instant or ZonedDateTime as any daylight savings rules won't be taken into account when working with DateTime directly.

fun Duration.Companion.between(start: TimePoint<*>, endExclusive: TimePoint<*>): Duration

Returns the Duration between two time points.