LongWeeks

A number of weeks.

inline class LongWeeks(value: Long) : Comparable<LongWeeks>

Constructors

LongWeeks
Link copied to clipboard
common
fun LongWeeks(value: Long)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

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

Divides this duration by a scalar value.

operator fun div(scalar: Int): LongWeeks
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): LongDays
operator fun minus(days: LongDays): LongDays
operator fun minus(weeks: IntWeeks): LongWeeks
operator fun minus(weeks: LongWeeks): LongWeeks
plus
Link copied to clipboard
common
operator fun plus(days: IntDays): LongDays
operator fun plus(days: LongDays): LongDays
operator fun plus(weeks: IntWeeks): LongWeeks
operator fun plus(weeks: LongWeeks): LongWeeks
rem
Link copied to clipboard
common
operator fun rem(scalar: Int): LongWeeks
operator fun rem(scalar: Long): LongWeeks
times
Link copied to clipboard
common

Multiplies this duration by a scalar value.

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

Converts this duration to an Int value.

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

Converts this duration to IntWeeks.

fun toIntWeeks(): IntWeeks
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(): LongWeeks

Properties

absoluteValue
Link copied to clipboard
common

The absolute value of this duration.

val absoluteValue: LongWeeks
inDays
Link copied to clipboard
common

Converts this duration to days.

val inDays: LongDays
value
Link copied to clipboard
common

The underlying value.

val value: Long

Extensions

asPeriod
Link copied to clipboard
common

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

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

Converts this duration to an equivalent Java Period.

fun LongWeeks.toJavaPeriod(): Period