Constructor

new ()

new (value:String)

new (value:String, formats:Array<String>, ?locale:String, ?strict:Bool)

new (value:String, format:String, ?locale:String, ?strict:Bool)

new (value:Float, format:String)

new (options:Dynamic<Float>)

new (milliseconds:Float)

new (date:Date)

new (values:Array<Float>)

Methods

add (value:Float, unit:String):Moment

add (options:Dynamic<Float>):Moment

add (duration:Duration):Moment

date (?setTo:Float):Moment

dates (?setTo:Float):Moment

diff (value:Moment, ?unit:String, ?floatingPoint:Bool):Float

diff (value:String, ?unit:String, ?floatingPoint:Bool):Float

diff (value:Float, ?unit:String, ?floatingPoint:Bool):Float

diff (value:Date, ?unit:String, ?floatingPoint:Bool):Float

diff (value:Array<Float>, ?unit:String, ?floatingPoint:Bool):Float

duration (value:Float, unit:String):Duration

duration (duration:String):Moment

duration (options:Dynamic<Float>):Moment

duration (duration:Float):Moment

format (?pattern:String):String

fromNow (?withoutSuffix:Bool):String

get (interval:String):Float

hour (?setTo:Float):Moment

hours (?setTo:Float):Moment

isValid ():Bool

max (args:Rest<Moment>):Moment

millisecond (?setTo:Float):Moment

milliseconds (?setTo:Float):Moment

min (args:Rest<Moment>):Moment

minute (?setTo:Float):Moment

minutes (?setTo:Float):Moment

month (?setTo:Int):Moment

months (?setTo:Int):Moment

second (?setTo:Float):Moment

seconds (?setTo:Float):Moment

set (unit:String, value:Float):Moment

set (options:Dynamic<Float>):Moment

subtract (value:Float, unit:String):Moment

subtract (options:Dynamic<Float>):Moment

subtract (duration:Duration):Moment

year (?setTo:Int):Moment

years (?setTo:Int):Moment

Static properties

static read only ISO_8601:String

Static methods

static utc ():Moment

static utc (value:Float):Moment

static utc (value:Array<Float>):Moment

static utc (value:String, ?format:String, ?locale:String, ?strict:Bool):Moment

static utc (value:String, ?formats:Array<String>, ?locale:String, ?strict:Bool):Moment

static utc (moment:Moment):Moment

static utc (date:Date):Moment