Constructors

Link copied to clipboard
constructor(value: JsLong)
constructor(value: String)
constructor(value: Date)
constructor(year: Int, monthIndex: Int, date: Int = definedExternally, hours: Int = definedExternally, minutes: Int = definedExternally, seconds: Int = definedExternally, milliseconds: Int = definedExternally)

Creates a new Date.

constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun getDate(): Int

Gets the day-of-the-month, using local time.

Link copied to clipboard
fun getDay(): Int

Gets the day of the week, using local time.

Link copied to clipboard

Gets the year, using local time.

Link copied to clipboard
fun getHours(): Int

Gets the hours in a date, using local time.

Link copied to clipboard

Gets the milliseconds of a Date, using local time.

Link copied to clipboard

Gets the minutes of a Date object, using local time.

Link copied to clipboard
fun getMonth(): Int

Gets the month, using local time.

Link copied to clipboard

Gets the seconds of a Date object, using local time.

Link copied to clipboard

Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.

Link copied to clipboard

Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer.

Link copied to clipboard

Gets the day-of-the-month, using Universal Coordinated Time (UTC).

Link copied to clipboard
fun getUTCDay(): Int

Gets the day of the week using Universal Coordinated Time (UTC).

Link copied to clipboard

Gets the year using Universal Coordinated Time (UTC).

Link copied to clipboard

Gets the hours value in a Date object using Universal Coordinated Time (UTC).

Link copied to clipboard

Gets the milliseconds of a Date object using Universal Coordinated Time (UTC).

Link copied to clipboard

Gets the minutes of a Date object using Universal Coordinated Time (UTC).

Link copied to clipboard

Gets the month of a Date object using Universal Coordinated Time (UTC).

Link copied to clipboard

Gets the seconds of a Date object using Universal Coordinated Time (UTC).

Link copied to clipboard
fun setDate(date: Int): Int

Sets the numeric day-of-the-month value of the Date object using local time.

Link copied to clipboard
fun setFullYear(year: Int, month: Int = definedExternally, date: Int = definedExternally): Int

Sets the year of the Date object using local time.

Link copied to clipboard
fun setHours(hours: Int, minutes: Int = definedExternally, seconds: Int = definedExternally, milliseconds: Int = definedExternally): Int

Sets the hour value in the Date object using local time.

Link copied to clipboard
fun setMilliseconds(milliseconds: Int): Int

Sets the milliseconds value in the Date object using local time.

Link copied to clipboard
fun setMinutes(minutes: Int, seconds: Int = definedExternally, milliseconds: Int = definedExternally): Int

Sets the minutes value in the Date object using local time.

Link copied to clipboard
fun setMonth(month: Int, date: Int = definedExternally): Int

Sets the month value in the Date object using local time.

Link copied to clipboard
fun setSeconds(seconds: Int, milliseconds: Int = definedExternally): Int

Sets the seconds value in the Date object using local time.

Link copied to clipboard
fun setTime(time: JsLong): JsLong

Sets the date and time value in the Date object.

Link copied to clipboard
fun setUTCDate(date: Int): Int

Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).

Link copied to clipboard
fun setUTCFullYear(year: Int, month: Int = definedExternally, date: Int = definedExternally): Int

Sets the year value in the Date object using Universal Coordinated Time (UTC).

Link copied to clipboard
fun setUTCHours(hours: Int, minutes: Int = definedExternally, seconds: Int = definedExternally, milliseconds: Int = definedExternally): Int

Sets the hours value in the Date object using Universal Coordinated Time (UTC).

Link copied to clipboard
fun setUTCMilliseconds(milliseconds: Int): Int

Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).

Link copied to clipboard
fun setUTCMinutes(minutes: Int, seconds: Int = definedExternally, milliseconds: Int = definedExternally): Int

Sets the minutes value in the Date object using Universal Coordinated Time (UTC).

Link copied to clipboard
fun setUTCMonth(month: Int, date: Int = definedExternally): Int

Sets the month value in the Date object using Universal Coordinated Time (UTC).

Link copied to clipboard
fun setUTCSeconds(seconds: Int, milliseconds: Int = definedExternally): Int

Sets the seconds value in the Date object using Universal Coordinated Time (UTC).

Link copied to clipboard

Returns a date as a string value.

Link copied to clipboard

Returns a date as a string value in ISO format.

Link copied to clipboard
fun toJSON(key: Any? = definedExternally): String

Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.

Link copied to clipboard

Returns a date as a string value appropriate to the host environment's current locale.

fun toLocaleDateString(locales: Locale, options: DateTimeFormatOptions = definedExternally): String
fun toLocaleDateString(locales: ReadonlyArray<Locale>, options: DateTimeFormatOptions = definedExternally): String

fun toLocaleDateString(locales: UnicodeBCP47LocaleIdentifier = definedExternally, options: DateTimeFormatOptions = definedExternally): String

Converts a date to a string by using the current or specified locale.

Link copied to clipboard

Returns a value as a string value appropriate to the host environment's current locale.

open fun toLocaleString(locales: Locale, options: DateTimeFormatOptions = definedExternally): String
open fun toLocaleString(locales: ReadonlyArray<Locale>, options: DateTimeFormatOptions = definedExternally): String
open fun toLocaleString(locales: ReadonlyArray<UnicodeBCP47LocaleIdentifier>, options: DateTimeFormatOptions = definedExternally): String

open fun toLocaleString(locales: UnicodeBCP47LocaleIdentifier, options: DateTimeFormatOptions = definedExternally): String

Converts a value to a string by using the current or specified locale.

Link copied to clipboard

Returns a time as a string value appropriate to the host environment's current locale.

fun toLocaleTimeString(locales: Locale, options: DateTimeFormatOptions = definedExternally): String
fun toLocaleTimeString(locales: ReadonlyArray<Locale>, options: DateTimeFormatOptions = definedExternally): String

fun toLocaleTimeString(locales: UnicodeBCP47LocaleIdentifier = definedExternally, options: DateTimeFormatOptions = definedExternally): String

Converts a time to a string by using the current or specified locale.

Link copied to clipboard
Link copied to clipboard

Returns a time as a string value.

Link copied to clipboard

Returns a date converted to a string using Universal Coordinated Time (UTC).

Link copied to clipboard

Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.