Constructors

Link copied to clipboard
constructor()
constructor(value: Int53)
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.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
external fun getDate(): Int

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

Link copied to clipboard
external fun getDay(): Int

Gets the day of the week, using local time.

Link copied to clipboard
external fun getFullYear(): Int

Gets the year, using local time.

Link copied to clipboard
external fun getHours(): Int

Gets the hours in a date, using local time.

Link copied to clipboard
external fun getMilliseconds(): Int

Gets the milliseconds of a Date, using local time.

Link copied to clipboard
external fun getMinutes(): Int

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

Link copied to clipboard
external fun getMonth(): Int

Gets the month, using local time.

Link copied to clipboard
external fun getSeconds(): Int

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

Link copied to clipboard
external fun getTime(): Int53

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

Link copied to clipboard
external fun getTimezoneOffset(): Int

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

Link copied to clipboard
external fun getUTCDate(): Int

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

Link copied to clipboard
external fun getUTCDay(): Int

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

Link copied to clipboard
external fun getUTCFullYear(): Int

Gets the year using Universal Coordinated Time (UTC).

Link copied to clipboard
external fun getUTCHours(): Int

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

Link copied to clipboard
external fun getUTCMilliseconds(): Int

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

Link copied to clipboard
external fun getUTCMinutes(): Int

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

Link copied to clipboard
external fun getUTCMonth(): Int

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

Link copied to clipboard
external fun getUTCSeconds(): Int

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

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

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

Link copied to clipboard
external 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
external 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
external fun setMilliseconds(milliseconds: Int): Int

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

Link copied to clipboard
external 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
external fun setMonth(month: Int, date: Int = definedExternally): Int

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

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

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

Link copied to clipboard
external fun setTime(time: Int53): Int53

Sets the date and time value in the Date object.

Link copied to clipboard
external 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
external 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
external 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
external fun setUTCMilliseconds(milliseconds: Int): Int

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

Link copied to clipboard
external 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
external 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
external 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
external fun toDateString(): String

Returns a date as a string value.

Link copied to clipboard
external fun toISOString(): String

Returns a date as a string value in ISO format.

Link copied to clipboard
external fun toJSON(key: JsAny? = 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
external fun toLocaleDateString(): String

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

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

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

Link copied to clipboard
open external fun toLocaleString(): String

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

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

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

open external fun toLocaleString(locales: ReadonlyArray<UnicodeBCP47LocaleIdentifier>, options: DateTimeFormatOptions = definedExternally): String
open external fun toLocaleString(locales: ReadonlyArray<Locale>, options: DateTimeFormatOptions = definedExternally): String
open external fun toLocaleString(locales: Locale, options: DateTimeFormatOptions = definedExternally): String
Link copied to clipboard
external fun toLocaleTimeString(): String

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

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

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

Link copied to clipboard
external fun toTemporalInstant(): Instant
Link copied to clipboard
external fun toTimeString(): String

Returns a time as a string value.

Link copied to clipboard
external fun toUTCString(): String

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

Link copied to clipboard
external fun valueOf(): Int53

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