Days

value class Days(value: Long) : Comparable<Days>

Constructors

Days
Link copied to clipboard
common
fun Days(value: Int)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

compareTo
Link copied to clipboard
common
open operator override fun compareTo(other: Days): Int
div
Link copied to clipboard
common
operator fun div(scalar: Int): Days
operator fun div(scalar: Long): Days

Returns this duration divided by a scalar value. @throws ArithmeticException if overflow occurs or the scalar is zero

minus
Link copied to clipboard
common
operator fun minus(days: Days): Days
operator fun minus(hours: Hours): Hours
operator fun minus(microseconds: Microseconds): Microseconds
operator fun minus(milliseconds: Milliseconds): Milliseconds
operator fun minus(minutes: Minutes): Minutes
operator fun minus(nanoseconds: Nanoseconds): Nanoseconds
operator fun minus(seconds: Seconds): Seconds
operator fun minus(weeks: Weeks): Days
plus
Link copied to clipboard
common
operator fun plus(days: Days): Days
operator fun plus(hours: Hours): Hours
operator fun plus(microseconds: Microseconds): Microseconds
operator fun plus(milliseconds: Milliseconds): Milliseconds
operator fun plus(minutes: Minutes): Minutes
operator fun plus(nanoseconds: Nanoseconds): Nanoseconds
operator fun plus(seconds: Seconds): Seconds
operator fun plus(weeks: Weeks): Days
rem
Link copied to clipboard
common
operator fun rem(scalar: Int): Days
operator fun rem(scalar: Long): Days

Returns the remainder of this duration divided by a scalar value.

times
Link copied to clipboard
common
operator fun times(scalar: Int): Days
operator fun times(scalar: Long): Days

Multiplies this duration by a scalar value. @throws ArithmeticException if overflow occurs

toComponents
Link copied to clipboard
common
inline fun <T> toComponents(action: (weeks: Weeks, days: Days) -> T): T
toComponentValues
Link copied to clipboard
common
inline fun <T> toComponentValues(action: (weeks: Long, days: Int) -> T): T
toDouble
Link copied to clipboard
common
fun toDouble(): Double

Converts this duration to a Double value.

toInt
Link copied to clipboard
common
fun toInt(): Int

Converts this duration to an Int value. @throws ArithmeticException if overflow occurs

toKotlinDuration
Link copied to clipboard
common
fun toKotlinDuration(): Duration

Converts this duration to a kotlin.time.Duration.

toLong
Link copied to clipboard
common
fun toLong(): Long

Converts this duration to a Long value.

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

Converts this duration to an ISO-8601 time interval representation.

unaryMinus
Link copied to clipboard
common
operator fun unaryMinus(): Days

Negates this duration. @throws ArithmeticException if overflow occurs

Properties

absoluteValue
Link copied to clipboard
common
val absoluteValue: Days

The absolute value of this duration. @throws ArithmeticException if overflow occurs

inHours
Link copied to clipboard
common
val inHours: Hours

Converts this duration to hours. @throws ArithmeticException if overflow occurs

inMicroseconds
Link copied to clipboard
common
val inMicroseconds: Microseconds

Converts this duration to microseconds. @throws ArithmeticException if overflow occurs

inMilliseconds
Link copied to clipboard
common
val inMilliseconds: Milliseconds

Converts this duration to milliseconds. @throws ArithmeticException if overflow occurs

inMinutes
Link copied to clipboard
common
val inMinutes: Minutes

Converts this duration to minutes. @throws ArithmeticException if overflow occurs

inNanoseconds
Link copied to clipboard
common
val inNanoseconds: Nanoseconds

Converts this duration to nanoseconds. @throws ArithmeticException if overflow occurs

inSeconds
Link copied to clipboard
common
val inSeconds: Seconds

Converts this duration to seconds. @throws ArithmeticException if overflow occurs

inWholeWeeks
Link copied to clipboard
common
val inWholeWeeks: Weeks

Converts this duration to the number of whole weeks.

value
Link copied to clipboard
common
val value: Long

The underlying value.

Extensions

asDuration
Link copied to clipboard
common
fun Days.asDuration(): Duration
asPeriod
Link copied to clipboard
common
fun Days.asPeriod(): Period

Converts this duration into a Period with the same number of days.

minus
Link copied to clipboard
common
operator fun Days.minus(period: Period): Period
plus
Link copied to clipboard
common
operator fun Days.plus(period: Period): Period
toJavaDuration
Link copied to clipboard
fun Days.toJavaDuration(): Duration

Converts this duration to an equivalent Java Duration.

toJavaPeriod
Link copied to clipboard
fun Days.toJavaPeriod(): Period

Converts this duration to an equivalent Java Period.

toNSTimeInterval
Link copied to clipboard
darwin
fun Days.toNSTimeInterval(): <ERROR CLASS>

Converts this duration to an equivalent NSTimeInterval.