YearMonth

value class YearMonth(internalPackedInfo: Int) : Serializable

Represents a couple of year and month.

It is packed in a value class wrapping an Int to prevent allocations.

Constructors

Link copied to clipboard
constructor(internalPackedInfo: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val days: Int

Days in this month of this year.

Link copied to clipboard

Number of days since the start of the year to reach next month.

Link copied to clipboard

Number of days since the start of the year to reach this month.

Link copied to clipboard

The month part.

Link copied to clipboard
val month1: Int

The month part as Int where Month.January is 1.

Link copied to clipboard
val year: Year

The year part.

Link copied to clipboard

The year part as Int.

Functions

Link copied to clipboard
operator fun minus(span: MonthSpan): YearMonth
Link copied to clipboard
operator fun plus(span: MonthSpan): YearMonth
Link copied to clipboard
open override fun toString(): String