MonthSpan

value class MonthSpan(val totalMonths: Int) : Comparable<MonthSpan> , Serializable

Represents a number of years and months temporal distance.

Constructors

Link copied to clipboard
constructor(totalMonths: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Months part of this MonthSpan as integer

Link copied to clipboard

Total months of this MonthSpan as integer

Link copied to clipboard

Total years of this MonthSpan as double (might contain decimals)

Link copied to clipboard

Years part of this MonthSpan as integer

Functions

Link copied to clipboard
open operator override fun compareTo(other: MonthSpan): Int
Link copied to clipboard
operator fun div(times: Double): MonthSpan
operator fun div(times: Float): MonthSpan
operator fun div(times: Int): MonthSpan
Link copied to clipboard
operator fun minus(other: DateTimeSpan): DateTimeSpan
operator fun minus(other: MonthSpan): MonthSpan
operator fun minus(other: TimeSpan): DateTimeSpan
Link copied to clipboard
operator fun plus(other: DateTimeSpan): DateTimeSpan
operator fun plus(other: MonthSpan): MonthSpan
operator fun plus(other: TimeSpan): DateTimeSpan
Link copied to clipboard
operator fun times(times: Double): MonthSpan
operator fun times(times: Float): MonthSpan
operator fun times(times: Int): MonthSpan
Link copied to clipboard
open override fun toString(): String

Converts this time to String formatting it like "20Y", "20Y 1M", "1M" or "0M".

Link copied to clipboard
operator fun unaryMinus(): MonthSpan
Link copied to clipboard
operator fun unaryPlus(): MonthSpan