Date

JS
1.1
class Date
(source)

Exposes the Date API to Kotlin.

Types

JS
1.1

LocaleOptions

interface LocaleOptions

Constructors

JS
1.1

<init>

Date(milliseconds: Number)
Date(dateString: String)
Date(year: Int, month: Int)
Date(year: Int, month: Int, day: Int)
Date(year: Int, month: Int, day: Int, hour: Int)
Date(year: Int, month: Int, day: Int, hour: Int, minute: Int)
Date(
    year: Int,
    month: Int,
    day: Int,
    hour: Int,
    minute: Int,
    second: Int)
Date(
    year: Int,
    month: Int,
    day: Int,
    hour: Int,
    minute: Int,
    second: Int,
    millisecond: Number)

Exposes the Date API to Kotlin.

Date()

Functions

JS
1.1

getDate

fun getDate(): Int
JS
1.1

getDay

fun getDay(): Int
JS
1.1

getFullYear

fun getFullYear(): Int
JS
1.1

getHours

fun getHours(): Int
JS
1.1

getMilliseconds

fun getMilliseconds(): Int
JS
1.1

getMinutes

fun getMinutes(): Int
JS
1.1

getMonth

fun getMonth(): Int
JS
1.1

getSeconds

fun getSeconds(): Int
JS
1.1

getTime

fun getTime(): Double
JS
1.1

getTimezoneOffset

fun getTimezoneOffset(): Int
JS
1.1

getUTCDate

fun getUTCDate(): Int
JS
1.1

getUTCDay

fun getUTCDay(): Int
JS
1.1

getUTCFullYear

fun getUTCFullYear(): Int
JS
1.1

getUTCHours

fun getUTCHours(): Int
JS
1.1

getUTCMilliseconds

fun getUTCMilliseconds(): Int
JS
1.1

getUTCMinutes

fun getUTCMinutes(): Int
JS
1.1

getUTCMonth

fun getUTCMonth(): Int
JS
1.1

getUTCSeconds

fun getUTCSeconds(): Int
JS
1.1

toDateString

fun toDateString(): String
JS
1.1

toISOString

fun toISOString(): String
JS
1.1

toJSON

fun toJSON(): Json
JS
1.1

toLocaleDateString

fun toLocaleDateString(
    locales: Array<String> = definedExternally,
    options: LocaleOptions = definedExternally
): String
fun toLocaleDateString(
    locales: String,
    options: LocaleOptions = definedExternally
): String
JS
1.1

toLocaleString

fun toLocaleString(
    locales: Array<String> = definedExternally,
    options: LocaleOptions = definedExternally
): String
fun toLocaleString(
    locales: String,
    options: LocaleOptions = definedExternally
): String
JS
1.1

toLocaleTimeString

fun toLocaleTimeString(
    locales: Array<String> = definedExternally,
    options: LocaleOptions = definedExternally
): String
fun toLocaleTimeString(
    locales: String,
    options: LocaleOptions = definedExternally
): String
JS
1.1

toTimeString

fun toTimeString(): String
JS
1.1

toUTCString

fun toUTCString(): String

Companion Object Functions

JS
1.1

now

fun now(): Double
JS
1.1

parse

fun parse(dateString: String): Double
JS
1.1

UTC

fun UTC(year: Int, month: Int): Double
fun UTC(year: Int, month: Int, day: Int): Double
fun UTC(year: Int, month: Int, day: Int, hour: Int): Double
fun UTC(
    year: Int,
    month: Int,
    day: Int,
    hour: Int,
    minute: Int
): Double
fun UTC(
    year: Int,
    month: Int,
    day: Int,
    hour: Int,
    minute: Int,
    second: Int
): Double
fun UTC(
    year: Int,
    month: Int,
    day: Int,
    hour: Int,
    minute: Int,
    second: Int,
    millisecond: Number
): Double