Spec-Zone.ru › Kotlin 2

Date

kotlin-stdlib/kotlin.js/Date

Начиная с Kotlin: 1.1

external class Date

Предоставляет Kotlin доступ к API Date.

Конструкторы

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

Типы

Companion

Начиная с Kotlin: 1.1

object Companion
LocaleOptions

Начиная с Kotlin: 1.1

interface LocaleOptions

Функции

getDate

Начиная с Kotlin: 1.1

fun getDate(): Int
getDay

Начиная с Kotlin: 1.1

fun getDay(): Int
getFullYear

Начиная с Kotlin: 1.1

fun getFullYear(): Int
getHours

Начиная с Kotlin: 1.1

fun getHours(): Int
getMilliseconds

Начиная с Kotlin: 1.1

fun getMilliseconds(): Int
getMinutes

Начиная с Kotlin: 1.1

fun getMinutes(): Int
getMonth

Начиная с Kotlin: 1.1

fun getMonth(): Int
getSeconds

Начиная с Kotlin: 1.1

fun getSeconds(): Int
getTime

Начиная с Kotlin: 1.1

fun getTime(): Double
getTimezoneOffset

Начиная с Kotlin: 1.1

fun getTimezoneOffset(): Int
getUTCDate

Начиная с Kotlin: 1.1

fun getUTCDate(): Int
getUTCDay

Начиная с Kotlin: 1.1

fun getUTCDay(): Int
getUTCFullYear

Начиная с Kotlin: 1.1

fun getUTCFullYear(): Int
getUTCHours

Начиная с Kotlin: 1.1

fun getUTCHours(): Int
getUTCMilliseconds

Начиная с Kotlin: 1.1

fun getUTCMilliseconds(): Int
getUTCMinutes

Начиная с Kotlin: 1.1

fun getUTCMinutes(): Int
getUTCMonth

Начиная с Kotlin: 1.1

fun getUTCMonth(): Int
getUTCSeconds

Начиная с Kotlin: 1.1

fun getUTCSeconds(): Int
toDateString

Начиная с Kotlin: 1.1

fun toDateString(): String
toISOString

Начиная с Kotlin: 1.1

fun toISOString(): String
toJSON

Начиная с Kotlin: 1.1

fun toJSON(): Json
toKotlinInstant

Начиная с Kotlin: 2.3

fun Date.toKotlinInstant(): Instant

Преобразует JS Date в соответствующий Instant.

toLocaleDateString

Начиная с Kotlin: 1.1

fun toLocaleDateString(locales: Array<String> = definedExternally, options: Date.LocaleOptions = definedExternally): String
fun toLocaleDateString(locales: String, options: Date.LocaleOptions = definedExternally): String
toLocaleString

Начиная с Kotlin: 1.1

fun toLocaleString(locales: Array<String> = definedExternally, options: Date.LocaleOptions = definedExternally): String
fun toLocaleString(locales: String, options: Date.LocaleOptions = definedExternally): String
toLocaleTimeString

Начиная с Kotlin: 1.1

fun toLocaleTimeString(locales: Array<String> = definedExternally, options: Date.LocaleOptions = definedExternally): String
fun toLocaleTimeString(locales: String, options: Date.LocaleOptions = definedExternally): String
toTimeString

Начиная с Kotlin: 1.1

fun toTimeString(): String
toUTCString

Начиная с Kotlin: 1.1

fun toUTCString(): String

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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API