class Date : Comparable<Date>
A date in an ambiguous region.
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
<init> |
Create a Date from a year, ISO month number, and day of month. <init>(year: Int, monthNumber: Int, day: Int)
Create a Date from a year, month, and day of month. <init>(year: Int, month: Month, day: Int) |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
dayOfMonth |
The day of the month. val dayOfMonth: Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
dayOfUnixEpoch |
The day of the Unix epoch. val dayOfUnixEpoch: Long |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
dayOfWeek |
The day of the week. val dayOfWeek: DayOfWeek |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
dayOfYear |
The day of the year -- also known as the ordinal date in ISO-8601. val dayOfYear: Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
daysSinceUnixEpoch |
The number of days away from the Unix epoch ( val daysSinceUnixEpoch: LongDays |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
isInLeapYear |
Check if this date falls within a leap year. val isInLeapYear: Boolean |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
isLeapDay |
Check if this is a leap day. val isLeapDay: Boolean |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
lengthOfMonth |
The length of this date's month in days. val lengthOfMonth: IntDays |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
lengthOfYear |
The length of this date's year in days. val lengthOfYear: IntDays |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
month |
The month of the year. val month: Month |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
monthNumber |
The ISO month number, from 1-12. val monthNumber: Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
unixEpochDay |
val |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
year |
The year. val year: Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
yearMonth |
val |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
compareTo |
fun compareTo(other: Date): Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
component1 |
operator fun component1(): Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
component2 |
operator fun component2(): Month |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
component3 |
operator fun component3(): Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
copy |
Return a copy of this Date, replacing individual components with new values as desired. fun copy(year: Int = this.year, month: Month = this.month, dayOfMonth: Int = this.day): Datefun copy(year: Int = this.year, monthNumber: Int, dayOfMonth: Int = this.day): Datefun copy(year: Int = this.year, dayOfYear: Int = this.dayOfYear): Date |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
equals |
fun equals(other: Any?): Boolean |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
hashCode |
fun hashCode(): Int |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
minus |
Return a Date with period subtracted from it. operator fun minus(period: Period): Dateoperator fun minus(years: IntYears): Dateoperator fun minus(years: LongYears): Dateoperator fun minus(months: IntMonths): Dateoperator fun minus(months: LongMonths): Dateoperator fun minus(weeks: IntWeeks): Dateoperator fun minus(weeks: LongWeeks): Dateoperator fun minus(days: IntDays): Dateoperator fun minus(days: LongDays): Date |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
plus |
Return a Date with period added to it. operator fun plus(period: Period): Dateoperator fun plus(years: IntYears): Dateoperator fun plus(years: LongYears): Dateoperator fun plus(months: IntMonths): Dateoperator fun plus(months: LongMonths): Dateoperator fun plus(weeks: IntWeeks): Dateoperator fun plus(weeks: LongWeeks): Dateoperator fun plus(days: IntDays): Dateoperator fun plus(days: LongDays): Date |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
rangeTo |
operator fun rangeTo(other: Date): DateRange |
toString |
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun toString(): <ERROR CLASS>(jvm) fun toString(): String |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
MAX |
The largest supported Date, which can be used as a "far future" sentinel. val MAX: Date |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
MIN |
The smallest supported Date, which can be used as a "far past" sentinel. val MIN: Date |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
fromDayOfUnixEpoch |
Create a Date from the day of the Unix epoch. fun fromDayOfUnixEpoch(day: Long): Date |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
fromDaysSinceUnixEpoch |
Create a Date from a duration of days relative to the Unix epoch of 1970-01-01. fun fromDaysSinceUnixEpoch(days: LongDays): Date |
(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)
fromUnixEpochDay |
fun |
(jvm)
endOfWeek |
The date at the end of the week that this date falls in. The first day of the week will be determined by locale. fun Date.endOfWeek(locale: Locale): Date |
(jvm)
startOfWeek |
The date at the start of the week that this date falls in. The first day of the week will be determined by locale. fun Date.startOfWeek(locale: Locale): Date |
(jvm)
toJavaLocalDate |
Convert to an equivalent Java fun Date.toJavaLocalDate(): LocalDate |
(jvm)
weekRange |
The date range of the week that this date falls within. The first day of the week will be determined by locale. fun Date.weekRange(locale: Locale): DateRange |