Reference Source
import {DateTime} from '@adobe/coral-spectrum'
public class | source

DateTime

The DateTime API is used as fallback to momentJS.

Static Member Summary

Static Public Members
public static

Static Method Summary

Static Public Methods
public static

isMoment(obj: *): *

public static

locale(value: *): *

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

add(value: *, type: *): *

public

clone(): *

public

date(): *

public

day(day: *): *

public
public

diff(obj: *): *

public

format(format: *): *

public

hours(hours: *): *

public

isAfter(coralDate: *, unit: *): boolean

public

isBefore(coralDate: *, unit: *): boolean

public

isSame(obj: *, type: *): *

public

isValid(): *

public

locale(value: *): *

public

minutes(minutes: *): *

public

month(): *

public

startOf(value: *): *

public

subtract(value: *, type: *): *

public

toDate(): *

public

week(): *

public

year(): *

Static Public Members

public static Moment: momentJS | DateTime: * source

Return:

momentJS | DateTime

Static Public Methods

public static isMoment(obj: *): * source

Params:

NameTypeAttributeDescription
obj *

Return:

*

See:

public static locale(value: *): * source

Params:

NameTypeAttributeDescription
value *

Return:

*

See:

Public Constructors

Public Methods

public add(value: *, type: *): * source

Params:

NameTypeAttributeDescription
value *
type *

Return:

*

See:

public date(): * source

Return:

*

See:

public day(day: *): * source

Params:

NameTypeAttributeDescription
day *

Return:

*

See:

public daysInMonth(): * source

Return:

*

See:

public diff(obj: *): * source

Params:

NameTypeAttributeDescription
obj *

Return:

*

See:

public format(format: *): * source

Params:

NameTypeAttributeDescription
format *

Return:

*

See:

public hours(hours: *): * source

Params:

NameTypeAttributeDescription
hours *

Return:

*

See:

public isAfter(coralDate: *, unit: *): boolean source

Params:

NameTypeAttributeDescription
coralDate *
unit *

Return:

boolean

See:

public isBefore(coralDate: *, unit: *): boolean source

Params:

NameTypeAttributeDescription
coralDate *
unit *

Return:

boolean

See:

public isSame(obj: *, type: *): * source

Params:

NameTypeAttributeDescription
obj *
type *

Return:

*

See:

public isValid(): * source

Return:

*

See:

public locale(value: *): * source

Params:

NameTypeAttributeDescription
value *

Return:

*

See:

public minutes(minutes: *): * source

Params:

NameTypeAttributeDescription
minutes *

Return:

*

See:

public month(): * source

Return:

*

See:

public startOf(value: *): * source

Params:

NameTypeAttributeDescription
value *

Return:

*

See:

public subtract(value: *, type: *): * source

Params:

NameTypeAttributeDescription
value *
type *

Return:

*

See:

public week(): * source

Return:

*

See:

public year(): * source

Return:

*

See: