Skip to content

//core/io.islandtime/Date/Companion

Companion

common

object Companion

Properties

Name Summary
MAX

common


val MAX: Date

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

common


val MIN: Date

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

Functions

Name Summary
fromDayOfUnixEpoch

common


fun fromDayOfUnixEpoch(day: Long): Date

Creates a Date from the day of the Unix epoch.
fromDaysSinceUnixEpoch

common


fun fromDaysSinceUnixEpoch(days: Days): Date

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

common


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

Creates a Date from an ISO week date.

common


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 in settings.

common


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

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

common


fun Date.Companion.now(): Date

Gets the current Date from the system clock.

common


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

Gets the current Date from the provided clock.

jvm


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

Gets the current Date from the provided clock.