Interface MomentStatic

Index

Call signatures

Properties

Methods

Call signatures

(): Moment

Returns

Moment

(date: number): Moment

Parameters

  • date: number

Returns

Moment

(date: Array<number>): Moment

Parameters

  • date: Array<number>

Returns

Moment

(date: string, format?: string, strict?: boolean): Moment

Parameters

  • date: string
  • format?: string optional
  • strict?: boolean optional

Returns

Moment

(date: string, format?: string, language?: string, strict?: boolean): Moment

Parameters

  • date: string
  • format?: string optional
  • language?: string optional
  • strict?: boolean optional

Returns

Moment

(date: string, formats: Array<string>, strict?: boolean): Moment

Parameters

  • date: string
  • formats: Array<string>
  • strict?: boolean optional

Returns

Moment

(date: string, formats: Array<string>, language?: string, strict?: boolean): Moment

Parameters

  • date: string
  • formats: Array<string>
  • language?: string optional
  • strict?: boolean optional

Returns

Moment

(date: Date): Moment

Parameters

  • date: Date

Returns

Moment

(date: Moment): Moment

Parameters

Returns

Moment

(date: Object): Moment

Parameters

  • date: Object

Returns

Moment

Properties

public calendar: any

public longDateFormat: any

public meridiem: (hour: number, minute: number, isLowercase: boolean) => string

public ordinal: (num: number) => string

public relativeTime: any

public version: string

Methods

public duration(milliseconds: Number): Duration

Parameters

  • milliseconds: Number

Returns

Duration

public duration(num: Number, unitOfTime: string): Duration

Parameters

  • num: Number
  • unitOfTime: string

Returns

Duration

public duration(input: MomentInput): Duration

Parameters

Returns

Duration

public duration(object: any): Duration

Parameters

  • object: any

Returns

Duration

public duration(): Duration

Returns

Duration

public invalid(parsingFlags?: Object): Moment

Parameters

  • parsingFlags?: Object optional

Returns

Moment

public isMoment(): boolean

Returns

boolean

public isMoment(m: any): boolean

Parameters

  • m: any

Returns

boolean

public lang(language: string): any

Parameters

  • language: string

Returns

any

public lang(language: string, definition: MomentLanguage): any

Parameters

Returns

any

public months(): Array<string>

Returns

Array<string>

public months(index: number): string

Parameters

  • index: number

Returns

string

public months(format: string): Array<string>

Parameters

  • format: string

Returns

Array<string>

public months(format: string, index: number): string

Parameters

  • format: string
  • index: number

Returns

string

public monthsShort(): Array<string>

Returns

Array<string>

public monthsShort(index: number): string

Parameters

  • index: number

Returns

string

public monthsShort(format: string): Array<string>

Parameters

  • format: string

Returns

Array<string>

public monthsShort(format: string, index: number): string

Parameters

  • format: string
  • index: number

Returns

string

public normalizeUnits(unit: string): string

Parameters

  • unit: string

Returns

string

public parseZone(date: string): Moment

Parameters

  • date: string

Returns

Moment

public unix(timestamp: number): Moment

Parameters

  • timestamp: number

Returns

Moment

public utc(): Moment

Returns

Moment

public utc(date: number): Moment

Parameters

  • date: number

Returns

Moment

public utc(date: Array<number>): Moment

Parameters

  • date: Array<number>

Returns

Moment

public utc(date: string, format?: string, strict?: boolean): Moment

Parameters

  • date: string
  • format?: string optional
  • strict?: boolean optional

Returns

Moment

public utc(date: string, format?: string, language?: string, strict?: boolean): Moment

Parameters

  • date: string
  • format?: string optional
  • language?: string optional
  • strict?: boolean optional

Returns

Moment

public utc(date: string, formats: Array<string>, strict?: boolean): Moment

Parameters

  • date: string
  • formats: Array<string>
  • strict?: boolean optional

Returns

Moment

public utc(date: string, formats: Array<string>, language?: string, strict?: boolean): Moment

Parameters

  • date: string
  • formats: Array<string>
  • language?: string optional
  • strict?: boolean optional

Returns

Moment

public utc(date: Date): Moment

Parameters

  • date: Date

Returns

Moment

public utc(date: Moment): Moment

Parameters

Returns

Moment

public utc(date: Object): Moment

Parameters

  • date: Object

Returns

Moment

public weekdays(): Array<string>

Returns

Array<string>

public weekdays(index: number): string

Parameters

  • index: number

Returns

string

public weekdays(format: string): Array<string>

Parameters

  • format: string

Returns

Array<string>

public weekdays(format: string, index: number): string

Parameters

  • format: string
  • index: number

Returns

string

public weekdaysMin(): Array<string>

Returns

Array<string>

public weekdaysMin(index: number): string

Parameters

  • index: number

Returns

string

public weekdaysMin(format: string): Array<string>

Parameters

  • format: string

Returns

Array<string>

public weekdaysMin(format: string, index: number): string

Parameters

  • format: string
  • index: number

Returns

string

public weekdaysShort(): Array<string>

Returns

Array<string>

public weekdaysShort(index: number): string

Parameters

  • index: number

Returns

string

public weekdaysShort(format: string): Array<string>

Parameters

  • format: string

Returns

Array<string>

public weekdaysShort(format: string, index: number): string

Parameters

  • format: string
  • index: number

Returns

string