LongMonths

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

A number of months.

Constructors

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

Types

Companion
Link copied to clipboard
common
object Companion

Functions

compareTo
Link copied to clipboard
common
open operator override fun compareTo(other: LongMonths): Int
div
Link copied to clipboard
common
operator fun div(scalar: Int): LongMonths
Divides this duration by a scalar value.
operator fun div(scalar: Long): LongMonths
Divides this duration by a scalar value.
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
fun isNegative(): Boolean
Checks if this duration is negative.
isPositive
Link copied to clipboard
common
fun isPositive(): Boolean
Checks if this duration is positive.
isZero
Link copied to clipboard
common
fun isZero(): Boolean
Checks if this duration is zero.
minus
Link copied to clipboard
common
operator fun minus(centuries: IntCenturies): LongMonths
operator fun minus(decades: IntDecades): LongMonths
operator fun minus(months: IntMonths): LongMonths
operator fun minus(years: IntYears): LongMonths
operator fun minus(centuries: LongCenturies): LongMonths
operator fun minus(decades: LongDecades): LongMonths
operator fun minus(months: LongMonths): LongMonths
operator fun minus(years: LongYears): LongMonths
plus
Link copied to clipboard
common
operator fun plus(centuries: IntCenturies): LongMonths
operator fun plus(decades: IntDecades): LongMonths
operator fun plus(months: IntMonths): LongMonths
operator fun plus(years: IntYears): LongMonths
operator fun plus(centuries: LongCenturies): LongMonths
operator fun plus(decades: LongDecades): LongMonths
operator fun plus(months: LongMonths): LongMonths
operator fun plus(years: LongYears): LongMonths
rem
Link copied to clipboard
common
operator fun rem(scalar: Int): LongMonths
operator fun rem(scalar: Long): LongMonths
times
Link copied to clipboard
common
operator fun times(scalar: Int): LongMonths
Multiplies this duration by a scalar value.
operator fun times(scalar: Long): LongMonths
Multiplies this duration by a scalar value.
toComponents
Link copied to clipboard
common
inline fun <T> toComponents(action: (years: LongYears, months: IntMonths) -> T): T
inline fun <T> toComponents(action: (decades: LongDecades, years: IntYears, months: IntMonths) -> T): T
inline fun <T> toComponents(action: (centuries: LongCenturies, decades: IntDecades, years: IntYears, months: IntMonths) -> T): T
toInt
Link copied to clipboard
common
fun toInt(): Int
Converts this duration to an Int value.
toIntMonths
Link copied to clipboard
common
fun toIntMonths(): IntMonths
Converts this duration to IntMonths.
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(): LongMonths
Negates this duration.

Properties

absoluteValue
Link copied to clipboard
common
val absoluteValue: LongMonths
The absolute value of this duration.
inCenturies
Link copied to clipboard
common
val inCenturies: LongCenturies
Converts this duration to the number of whole centuries.
inDecades
Link copied to clipboard
common
val inDecades: LongDecades
Converts this duration to the number of whole decades.
inYears
Link copied to clipboard
common
val inYears: LongYears
Converts this duration to the number of whole years.
value
Link copied to clipboard
common
val value: Long
The underlying value.

Extensions

asPeriod
Link copied to clipboard
common
fun LongMonths.asPeriod(): Period
Converts this duration into a Period with the same number of months.
minus
Link copied to clipboard
common
operator fun LongMonths.minus(period: Period): Period
plus
Link copied to clipboard
common
operator fun LongMonths.plus(period: Period): Period
toJavaPeriod
Link copied to clipboard
fun LongMonths.toJavaPeriod(): Period
Converts this duration to an equivalent Java Period.