Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

References

Re-exports MomentTimezone
Re-exports MomentZone
Re-exports MomentZoneOffset

Type Aliases

CalendarKey: "sameDay" | "nextDay" | "lastDay" | "nextWeek" | "lastWeek" | "sameElse" | string
CalendarSpecVal: string | ((m?: export=.MomentInput, now?: export=.Moment) => string)
DurationInputArg1: export=.Duration | number | string | export=.FromTo | export=.DurationInputObject | null | undefined
LocaleSpecifier: string | export=.Moment | export=.Duration | string[] | boolean
LongDateFormatKey: "LTS" | "LT" | "L" | "LL" | "LLL" | "LLLL" | "lts" | "lt" | "l" | "ll" | "lll" | "llll"
MomentFormatSpecification: string | export=.MomentBuiltinFormat | (string | export=.MomentBuiltinFormat)[]
MomentInput: export=.Moment | Date | string | number | (number | string)[] | export=.MomentInputObject | null | undefined
MonthWeekdayFn: ((momentToFormat: export=.Moment, format?: string) => string)

Type declaration

    • Parameters

      Returns string

RelativeTimeFuturePastVal: string | ((relTime: string) => string)
RelativeTimeKey: "s" | "ss" | "m" | "mm" | "h" | "hh" | "d" | "dd" | "w" | "ww" | "M" | "MM" | "y" | "yy"
RelativeTimeSpecVal: string | ((n: number, withoutSuffix: boolean, key: export=.RelativeTimeKey, isFuture: boolean) => string)
WeekdaySimpleFn: ((momentToFormat: export=.Moment) => string)

Type declaration

Variables

HTML5_FMT: { DATE: string; DATETIME_LOCAL: string; DATETIME_LOCAL_MS: string; DATETIME_LOCAL_SECONDS: string; MONTH: string; TIME: string; TIME_MS: string; TIME_SECONDS: string; WEEK: string }

Type declaration

  • DATE: string
  • DATETIME_LOCAL: string
  • DATETIME_LOCAL_MS: string
  • DATETIME_LOCAL_SECONDS: string
  • MONTH: string
  • TIME: string
  • TIME_MS: string
  • TIME_SECONDS: string
  • WEEK: string

Constant used to enable explicit ISO_8601 format parsing.

defaultFormat: string
defaultFormatUtc: string
deprecationHandler: ((name: string | null, msg: string) => void) | null | undefined
suppressDeprecationWarnings: boolean
version: string

Functions

  • isDate(m: any): m is Date
  • Parameters

    • m: any

    Returns m is Date

  • lang(language?: string): string
  • lang(language?: string, definition?: export=.Locale): string
  • deprecated

    in 2.8.0

    Parameters

    • Optional language: string

    Returns string

  • deprecated

    in 2.8.0

    Parameters

    Returns string

  • locale(language?: string): string
  • locale(language?: string[]): string
  • locale(language?: string, definition?: null | export=.LocaleSpecification): string
  • Parameters

    • Optional language: string

    Returns string

  • Parameters

    • Optional language: string[]

    Returns string

  • Parameters

    Returns string

  • locales(): string[]
  • Returns string[]

  • months(): string[]
  • months(index: number): string
  • months(format: string): string[]
  • months(format: string, index: number): string
  • Returns string[]

  • Parameters

    • index: number

    Returns string

  • Parameters

    • format: string

    Returns string[]

  • Parameters

    • format: string
    • index: number

    Returns string

  • monthsShort(): string[]
  • monthsShort(index: number): string
  • monthsShort(format: string): string[]
  • monthsShort(format: string, index: number): string
  • Returns string[]

  • Parameters

    • index: number

    Returns string

  • Parameters

    • format: string

    Returns string[]

  • Parameters

    • format: string
    • index: number

    Returns string

  • now(): number
  • Returns unix time in milliseconds. Overwrite for profit.

    Returns number

  • parseTwoDigitYear(input: string): number
  • Parameters

    • input: string

    Returns number

  • relativeTimeRounding(fn: ((num: number) => number)): boolean
  • relativeTimeRounding(): ((num: number) => number)
  • Parameters

    • fn: ((num: number) => number)
        • (num: number): number
        • Parameters

          • num: number

          Returns number

    Returns boolean

  • Returns ((num: number) => number)

      • (num: number): number
      • Parameters

        • num: number

        Returns number

  • relativeTimeThreshold(threshold: string): number | boolean
  • relativeTimeThreshold(threshold: string, limit: number): boolean
  • Parameters

    • threshold: string

    Returns number | boolean

  • Parameters

    • threshold: string
    • limit: number

    Returns boolean

  • Parameters

    • Optional inp: export=.MomentInput
    • Optional strict: boolean

      Strict parsing disables the deprecated fallback to the native Date constructor when parsing a string.

    Returns export=.Moment

  • Parameters

    • Optional inp: export=.MomentInput
    • Optional format: export=.MomentFormatSpecification
    • Optional strict: boolean

      Strict parsing requires that the format and input match exactly, including delimiters. Strict parsing is frequently the best parsing option. For more information about choosing strict vs forgiving parsing, see the parsing guide.

    Returns export=.Moment

  • Parameters

    • Optional inp: export=.MomentInput
    • Optional format: export=.MomentFormatSpecification
    • Optional language: string
    • Optional strict: boolean

      Strict parsing requires that the format and input match exactly, including delimiters. Strict parsing is frequently the best parsing option. For more information about choosing strict vs forgiving parsing, see the parsing guide.

    Returns export=.Moment

  • weekdays(): string[]
  • weekdays(index: number): string
  • weekdays(format: string): string[]
  • weekdays(format: string, index: number): string
  • weekdays(localeSorted: boolean): string[]
  • weekdays(localeSorted: boolean, index: number): string
  • weekdays(localeSorted: boolean, format: string): string[]
  • weekdays(localeSorted: boolean, format: string, index: number): string
  • Returns string[]

  • Parameters

    • index: number

    Returns string

  • Parameters

    • format: string

    Returns string[]

  • Parameters

    • format: string
    • index: number

    Returns string

  • Parameters

    • localeSorted: boolean

    Returns string[]

  • Parameters

    • localeSorted: boolean
    • index: number

    Returns string

  • Parameters

    • localeSorted: boolean
    • format: string

    Returns string[]

  • Parameters

    • localeSorted: boolean
    • format: string
    • index: number

    Returns string

  • weekdaysMin(): string[]
  • weekdaysMin(index: number): string
  • weekdaysMin(format: string): string[]
  • weekdaysMin(format: string, index: number): string
  • weekdaysMin(localeSorted: boolean): string[]
  • weekdaysMin(localeSorted: boolean, index: number): string
  • weekdaysMin(localeSorted: boolean, format: string): string[]
  • weekdaysMin(localeSorted: boolean, format: string, index: number): string
  • Returns string[]

  • Parameters

    • index: number

    Returns string

  • Parameters

    • format: string

    Returns string[]

  • Parameters

    • format: string
    • index: number

    Returns string

  • Parameters

    • localeSorted: boolean

    Returns string[]

  • Parameters

    • localeSorted: boolean
    • index: number

    Returns string

  • Parameters

    • localeSorted: boolean
    • format: string

    Returns string[]

  • Parameters

    • localeSorted: boolean
    • format: string
    • index: number

    Returns string

  • weekdaysShort(): string[]
  • weekdaysShort(index: number): string
  • weekdaysShort(format: string): string[]
  • weekdaysShort(format: string, index: number): string
  • weekdaysShort(localeSorted: boolean): string[]
  • weekdaysShort(localeSorted: boolean, index: number): string
  • weekdaysShort(localeSorted: boolean, format: string): string[]
  • weekdaysShort(localeSorted: boolean, format: string, index: number): string
  • Returns string[]

  • Parameters

    • index: number

    Returns string

  • Parameters

    • format: string

    Returns string[]

  • Parameters

    • format: string
    • index: number

    Returns string

  • Parameters

    • localeSorted: boolean

    Returns string[]

  • Parameters

    • localeSorted: boolean
    • index: number

    Returns string

  • Parameters

    • localeSorted: boolean
    • format: string

    Returns string[]

  • Parameters

    • localeSorted: boolean
    • format: string
    • index: number

    Returns string

Generated using TypeDoc