inline class Year : Comparable<Year>
A year as defined by ISO-8601.
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
<init> |
Creates a Year. <init>(value: Int) |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
dateRange |
The date range of the year. val dateRange: DateRange |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
dayRange |
The day range of the year. This will be either val dayRange: IntRange |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
endDate |
The last date of the year. val endDate: Date |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
isLeap |
Checks if this is a leap year. val isLeap: Boolean |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
isValid |
Checks if this year is within the supported range. val isValid: Boolean |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
lastDay |
The last day of the year. This will be either val lastDay: Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
length |
The length of the year in days. val length: IntDays |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
startDate |
The first date of the year. val startDate: Date |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
value |
The year value. val value: Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
compareTo |
fun compareTo(other: Year): Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
contains |
operator fun contains(yearMonth: YearMonth): Booleanoperator fun contains(date: Date): Boolean |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
minus |
operator fun minus(years: LongYears): Yearoperator fun minus(years: IntYears): Year |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
plus |
operator fun plus(years: LongYears): Yearoperator fun plus(years: IntYears): Year |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
toString |
Converts this year to a string in ISO-8601 extended format. For example, fun toString(): String |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
validated |
Ensures that this year is valid, throwing an exception if it isn't. fun validated(): Year |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
MAX |
The latest supported Year, which can be used as a "far future" sentinel. val MAX: Year |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
MAX_VALUE |
The latest supported year value. const val MAX_VALUE: Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
MIN |
The earliest supported Year, which can be used as a "far past" sentinel. val MIN: Year |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
MIN_VALUE |
The earliest supported year value. const val MIN_VALUE: Int |
(jvm)
toJavaYear |
Convert to an equivalent Java fun Year.toJavaYear(): Year |