Skip to content

//core/io.islandtime.measures/Weeks

Weeks

common

@JvmInline

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

Constructors

Weeks

common

constructor(value: Int)

constructor(value: Long)

Types

Name Summary
Companion

common


object Companion

Properties

Name Summary
absoluteValue

common


val absoluteValue: Weeks

The absolute value of this duration.
inDays

common


val inDays: Days

Converts this duration to days.
value

common


val value: Long

The underlying value.

Functions

Name Summary
asPeriod

common


fun Weeks.asPeriod(): Period

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

common


open operator override fun compareTo(other: Weeks): Int
div

common


operator fun div(scalar: Int): Weeks

operator fun div(scalar: Long): Weeks

Returns this duration divided by a scalar value.
minus

common


operator fun minus(days: Days): Days

operator fun minus(weeks: Weeks): Weeks
minus

common


operator fun Weeks.minus(period: Period): Period
plus

common


operator fun plus(days: Days): Days

operator fun plus(weeks: Weeks): Weeks
plus

common


operator fun Weeks.plus(period: Period): Period
rem

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

common


operator fun times(scalar: Int): Weeks

operator fun times(scalar: Long): Weeks

Multiplies this duration by a scalar value.
toDouble

common


fun toDouble(): Double

Converts this duration to a Double value.
toInt

common


fun toInt(): Int

Converts this duration to an Int value.
toJavaPeriod

jvm


fun Weeks.toJavaPeriod(): Period

Converts this duration to an equivalent Java Period.
toLong

common


fun toLong(): Long

Converts this duration to a Long value.
toString

common


open override fun toString(): String

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

common


operator fun unaryMinus(): Weeks

Negates this duration.