Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

CalendarKey

CalendarKey: "sameDay" | "nextDay" | "lastDay" | "nextWeek" | "lastWeek" | "sameElse" | string

CalendarSpecVal

CalendarSpecVal: string | ((m?: MomentInput, now?: Moment) => string)

DurationInputArg1

DurationInputArg1: Duration | number | string | FromTo | DurationInputObject | null | undefined

DurationInputArg2

DurationInputArg2: DurationConstructor

LocaleSpecifier

LocaleSpecifier: string | Moment | Duration | string[] | boolean

LongDateFormatKey

LongDateFormatKey: "LTS" | "LT" | "L" | "LL" | "LLL" | "LLLL" | "lts" | "lt" | "l" | "ll" | "lll" | "llll"

MomentFormatSpecification

MomentFormatSpecification: string | MomentBuiltinFormat | (string | MomentBuiltinFormat)[]

MomentInput

MomentInput: Moment | Date | string | number | (number | string)[] | MomentInputObject | null | undefined

MonthWeekdayFn

MonthWeekdayFn: (momentToFormat: Moment, format?: string) => string

Type declaration

    • (momentToFormat: Moment, format?: string): string
    • Parameters

      • momentToFormat: Moment
      • Optional format: string

      Returns string

RelativeTimeFuturePastVal

RelativeTimeFuturePastVal: string | ((relTime: string) => string)

RelativeTimeKey

RelativeTimeKey: "s" | "ss" | "m" | "mm" | "h" | "hh" | "d" | "dd" | "w" | "ww" | "M" | "MM" | "y" | "yy"

RelativeTimeSpecVal

RelativeTimeSpecVal: string | ((n: number, withoutSuffix: boolean, key: RelativeTimeKey, isFuture: boolean) => string)

WeekdaySimpleFn

WeekdaySimpleFn: (momentToFormat: Moment) => string

Type declaration

    • (momentToFormat: Moment): string
    • Parameters

      Returns string

Functions

export=

  • Parameters

    • Optional inp: MomentInput
    • Optional strict: boolean

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

    Returns Moment

  • Parameters

    • Optional inp: MomentInput
    • Optional format: 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 Moment

  • Parameters

    • Optional inp: MomentInput
    • Optional format: 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 Moment

Generated using TypeDoc