IntWeeks

A number of weeks.

inline class IntWeeks(value: Int) : Comparable<IntWeeks>

Constructors

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

Types

Companion
Link copied to clipboard
common
object Companion

Functions

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

Divides this duration by a scalar value.

operator fun div(scalar: Int): IntWeeks
operator fun div(scalar: Long): LongWeeks
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
isNegative
Link copied to clipboard
common

Checks if this duration is negative.

fun isNegative(): Boolean
isPositive
Link copied to clipboard
common

Checks if this duration is positive.

fun isPositive(): Boolean
isZero
Link copied to clipboard
common

Checks if this duration is zero.

fun isZero(): Boolean
minus
Link copied to clipboard
common
operator fun minus(days: IntDays): IntDays
operator fun minus(days: LongDays): LongDays
operator fun minus(weeks: IntWeeks): IntWeeks
operator fun minus(weeks: LongWeeks): LongWeeks
plus
Link copied to clipboard
common
operator fun plus(days: IntDays): IntDays
operator fun plus(days: LongDays): LongDays
operator fun plus(weeks: IntWeeks): IntWeeks
operator fun plus(weeks: LongWeeks): LongWeeks
rem
Link copied to clipboard
common
operator fun rem(scalar: Int): IntWeeks
operator fun rem(scalar: Long): LongWeeks
times
Link copied to clipboard
common

Multiplies this duration by a scalar value.

operator fun times(scalar: Int): IntWeeks
operator fun times(scalar: Long): LongWeeks
toLong
Link copied to clipboard
common

Converts this duration to a Long value.

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

Converts this duration to LongWeeks.

fun toLongWeeks(): LongWeeks
toString
Link copied to clipboard
common

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

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

Negates this duration.

operator fun unaryMinus(): IntWeeks

Properties

absoluteValue
Link copied to clipboard
common

The absolute value of this duration.

val absoluteValue: IntWeeks
inDays
Link copied to clipboard
common

Converts this duration to days.

val inDays: IntDays
value
Link copied to clipboard
common

The underlying value.

val value: Int

Extensions

asPeriod
Link copied to clipboard
common

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

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

Converts this duration to an equivalent Java Period.

fun IntWeeks.toJavaPeriod(): Period