Companion

object Companion

Functions

equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
fromDayOfUnixEpoch
Link copied to clipboard
common

Creates a Date from the day of the Unix epoch.

fun fromDayOfUnixEpoch(day: Long): Date
fromDaysSinceUnixEpoch
Link copied to clipboard
common

Creates a Date from a duration of days relative to the Unix epoch of 1970-01-01.

fun fromDaysSinceUnixEpoch(days: LongDays): Date
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

MAX
Link copied to clipboard
common

The latest supported Date, which can be used as a "far future" sentinel.

val MAX: Date
MIN
Link copied to clipboard
common

The earliest supported Date, which can be used as a "far past" sentinel.

val MIN: Date

Extensions

fromWeekDate
Link copied to clipboard
common

Creates a Date from an ISO week date.

fun Date.Companion.fromWeekDate(year: Int, week: Int, day: Int): Date

Creates a Date from a week date representation using the week definition in settings.

fun Date.Companion.fromWeekDate(year: Int, week: Int, day: Int, settings: WeekSettings): Date

Creates a Date from a week date representation using the week definition associated with the provided locale.

fun Date.Companion.fromWeekDate(year: Int, week: Int, day: Int, locale: Locale): Date
now
Link copied to clipboard

Gets the current Date from the provided clock.

fun Date.Companion.now(clock: Clock): Date

Gets the current Date from the system clock.

common
fun Date.Companion.now(): Date

Gets the current Date from the provided clock.

common
fun Date.Companion.now(clock: Clock): Date