kvision / pl.treksoft.kvision.moment / Moment

Moment

open external class Moment

Constructors

<init>

Moment(dateArray: Array<dynamic>)
Moment(dateString: String, patter: String)
Moment(dateString: String)
Moment(date: Date)
Moment()

Functions

add

open fun add(duration: dynamic, key: String): dynamic

calendar

open fun calendar(): dynamic
open fun calendar(referenceTime: dynamic): dynamic
open fun calendar(referenceTime: dynamic, formats: dynamic): dynamic

daysInMonth

open fun daysInMonth(): dynamic

diff

open fun diff(moment: dynamic): dynamic
open fun diff(moment: dynamic, key: dynamic): dynamic
open fun diff(moment: dynamic, key: dynamic, floatingPoint: Boolean): dynamic

endOf

open fun endOf(key: String): dynamic

format

open fun format(pattern: String): dynamic
open fun format(): dynamic

from

open fun from(moment: dynamic): dynamic
open fun from(withoutSuffix: Boolean): dynamic

fromNow

open fun fromNow(): dynamic
open fun fromNow(withoutSuffix: Boolean): dynamic

inspect

open fun inspect(): dynamic

isAfter

open fun isAfter(moment: dynamic): Boolean
open fun isAfter(moment: dynamic, key: String): Boolean

isBefore

open fun isBefore(moment: dynamic): Boolean
open fun isBefore(moment: dynamic, key: String): Boolean

isBetween

open fun isBetween(firstMoment: dynamic, secondMoment: dynamic): Boolean
open fun isBetween(firstMoment: dynamic, secondMoment: dynamic, key: String, inclusivity: String): Boolean
open fun isBetween(firstMoment: dynamic, secondMoment: dynamic, key: String): Boolean

isDST

open fun isDST(): Boolean

isDSTShifted

open fun isDSTShifted(): Boolean

isLeapYear

open fun isLeapYear(): Boolean

isSame

open fun isSame(moment: dynamic): Boolean
open fun isSame(moment: dynamic, key: String): Boolean

isSameOrAfter

open fun isSameOrAfter(moment: dynamic): Boolean
open fun isSameOrAfter(moment: dynamic, key: String): Boolean

isSameOrBefore

open fun isSameOrBefore(moment: dynamic): Boolean
open fun isSameOrBefore(moment: dynamic, key: String): Boolean

lang

open fun lang(locale: String): dynamic
open fun lang(resetLocale: Boolean): dynamic

local

open fun local(): dynamic

locale

open fun locale(locale: String): dynamic
open fun locale(resetLocale: Boolean): dynamic

startOf

open fun startOf(key: String): dynamic

subtract

open fun subtract(duration: dynamic, key: String): dynamic

to

open fun to(moment: dynamic): dynamic
open fun to(withoutPrefix: Boolean): dynamic

toArray

open fun toArray(): dynamic

toDate

open fun toDate(): dynamic

toISOString

open fun toISOString(): dynamic
open fun toISOString(keepOffset: Boolean): dynamic

toJSON

open fun toJSON(): dynamic

toNow

open fun toNow(): dynamic
open fun toNow(withoutPrefix: Boolean): dynamic

toObject

open fun toObject(): dynamic

unix

open fun unix(): dynamic

utc

open fun utc(): dynamic

utcOffset

open fun utcOffset(): dynamic
open fun utcOffset(amount: dynamic): dynamic
open fun utcOffset(amount: dynamic, keepExistingTimeOfDay: Boolean): dynamic

valueOf

open fun valueOf(): dynamic

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.