core / io.islandtime / Year

Year

(iosArm64, iosX64, jvm, macosX64) inline class Year : Comparable<Year>

Constructors

(iosArm64, iosX64, jvm, macosX64)

<init>

<init>(value: Int)

Properties

(iosArm64, iosX64, jvm, macosX64)

dateRange

The date range of the year.

val dateRange: DateRange
(iosArm64, iosX64, jvm, macosX64)

dayRange

The day range of the year. This will be either 1..365 or 1.366 depending on whether this is a common or leap year.

val dayRange: IntRange
(iosArm64, iosX64, jvm, macosX64)

endDate

The last date of the year.

val endDate: Date
(iosArm64, iosX64, jvm, macosX64)

isLeap

Is this a leap year?

val isLeap: Boolean
(iosArm64, iosX64, jvm, macosX64)

isValid

Is this year within the supported range?

val isValid: Boolean
(iosArm64, iosX64, jvm, macosX64)

lastDay

The last day of the year. This will be either 365 or 366 depending on whether this is a common or leap year.

val lastDay: Int
(iosArm64, iosX64, jvm, macosX64)

length

The length of the year in days.

val length: IntDays
(iosArm64, iosX64, jvm, macosX64)

startDate

The first date of the year.

val startDate: Date
(iosArm64, iosX64, jvm, macosX64)

value

val value: Int

Functions

(iosArm64, iosX64, jvm, macosX64)

compareTo

fun compareTo(other: Year): Int
(iosArm64, iosX64, jvm, macosX64)

contains

operator fun contains(yearMonth: YearMonth): Boolean
operator fun contains(date: Date): Boolean
(iosArm64, iosX64, jvm, macosX64)

minus

operator fun minus(years: LongYears): Year
operator fun minus(years: IntYears): Year
(iosArm64, iosX64, jvm, macosX64)

plus

operator fun plus(years: LongYears): Year
operator fun plus(years: IntYears): Year
(iosArm64, iosX64, jvm, macosX64)

toString

fun toString(): String
(iosArm64, iosX64, jvm, macosX64)

validated

fun validated(): Year

Companion Object Properties

(iosArm64, iosX64, jvm, macosX64)

MAX

val MAX: Year
(iosArm64, iosX64, jvm, macosX64)

MAX_VALUE

const val MAX_VALUE: Int
(iosArm64, iosX64, jvm, macosX64)

MIN

val MIN: Year
(iosArm64, iosX64, jvm, macosX64)

MIN_VALUE

const val MIN_VALUE: Int

Extension Functions

(jvm)

toJavaYear

fun Year.toJavaYear(): Year