Weeks

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

Constructors

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

Types

Companion
Link copied to clipboard
common
object Companion

Functions

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

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(weeks: Weeks): Weeks
plus
Link copied to clipboard
common
operator fun plus(days: Days): Days
operator fun plus(weeks: Weeks): Weeks
rem
Link copied to clipboard
common
operator fun rem(scalar: Int): Weeks
operator fun rem(scalar: Long): Weeks

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

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

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

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

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(): Weeks

Negates this duration. @throws ArithmeticException if overflow occurs

Properties

absoluteValue
Link copied to clipboard
common
val absoluteValue: Weeks

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

inDays
Link copied to clipboard
common
val inDays: Days

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

value
Link copied to clipboard
common
val value: Long

The underlying value.

Extensions

asPeriod
Link copied to clipboard
common
fun Weeks.asPeriod(): Period

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

minus
Link copied to clipboard
common
operator fun Weeks.minus(period: Period): Period
plus
Link copied to clipboard
common
operator fun Weeks.plus(period: Period): Period
toJavaPeriod
Link copied to clipboard
fun Weeks.toJavaPeriod(): Period

Converts this duration to an equivalent Java Period.