W3cubDocs

/Kotlin

Date

Platform and version requirements: JS (1.1)
class Date

Exposes the Date API to Kotlin.

Types

Platform and version requirements: JS (1.1)

LocaleOptions

interface LocaleOptions

Constructors

Platform and version requirements: 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

Platform and version requirements: JS (1.1)

getDate

fun getDate(): Int
Platform and version requirements: JS (1.1)

getDay

fun getDay(): Int
Platform and version requirements: JS (1.1)

getFullYear

fun getFullYear(): Int
Platform and version requirements: JS (1.1)

getHours

fun getHours(): Int
Platform and version requirements: JS (1.1)

getMilliseconds

fun getMilliseconds(): Int
Platform and version requirements: JS (1.1)

getMinutes

fun getMinutes(): Int
Platform and version requirements: JS (1.1)

getMonth

fun getMonth(): Int
Platform and version requirements: JS (1.1)

getSeconds

fun getSeconds(): Int
Platform and version requirements: JS (1.1)

getTime

fun getTime(): Double
Platform and version requirements: JS (1.1)

getTimezoneOffset

fun getTimezoneOffset(): Int
Platform and version requirements: JS (1.1)

getUTCDate

fun getUTCDate(): Int
Platform and version requirements: JS (1.1)

getUTCDay

fun getUTCDay(): Int
Platform and version requirements: JS (1.1)

getUTCFullYear

fun getUTCFullYear(): Int
Platform and version requirements: JS (1.1)

getUTCHours

fun getUTCHours(): Int
Platform and version requirements: JS (1.1)

getUTCMilliseconds

fun getUTCMilliseconds(): Int
Platform and version requirements: JS (1.1)

getUTCMinutes

fun getUTCMinutes(): Int
Platform and version requirements: JS (1.1)

getUTCMonth

fun getUTCMonth(): Int
Platform and version requirements: JS (1.1)

getUTCSeconds

fun getUTCSeconds(): Int
Platform and version requirements: JS (1.1)

toDateString

fun toDateString(): String
Platform and version requirements: JS (1.1)

toISOString

fun toISOString(): String
Platform and version requirements: JS (1.1)

toJSON

fun toJSON(): Json
Platform and version requirements: JS (1.1)

toLocaleDateString

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

toLocaleString

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

toLocaleTimeString

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

toTimeString

fun toTimeString(): String
Platform and version requirements: JS (1.1)

toUTCString

fun toUTCString(): String

Companion Object Functions

Platform and version requirements: JS (1.1)

now

fun now(): Double
Platform and version requirements: JS (1.1)

parse

fun parse(dateString: String): Double
Platform and version requirements: 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

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-date/index.html