Interface Moment

interface Moment {
    constructor: Function;
    add(amount?, unit?): Moment;
    add(unit, amount): Moment;
    calendar(): string;
    calendar(formats): string;
    calendar(time?, formats?): string;
    clone(): Moment;
    creationData(): MomentCreationData;
    date(d): Moment;
    date(): number;
    dates(d): Moment;
    dates(): number;
    day(d): Moment;
    day(): number;
    dayOfYear(): number;
    dayOfYear(d): Moment;
    days(d): Moment;
    days(): number;
    daysInMonth(): number;
    diff(b, unitOfTime?, precise?): number;
    endOf(unitOfTime): Moment;
    format(format?): string;
    from(inp, suffix?): string;
    fromNow(withoutSuffix?): string;
    get(unit): number;
    hasAlignedHourOffset(other?): boolean;
    hasOwnProperty(v): boolean;
    hour(h): Moment;
    hour(): number;
    hours(h): Moment;
    hours(): number;
    inspect(): string;
    invalidAt(): number;
    isAfter(inp?, granularity?): boolean;
    isBefore(inp?, granularity?): boolean;
    isBetween(a, b, granularity?, inclusivity?): boolean;
    isDST(): boolean;
    isDSTShifted(): boolean;
    isLeapYear(): boolean;
    isLocal(): boolean;
    isPrototypeOf(v): boolean;
    isSame(inp?, granularity?): boolean;
    isSameOrAfter(inp?, granularity?): boolean;
    isSameOrBefore(inp?, granularity?): boolean;
    isUTC(): boolean;
    isUtc(): boolean;
    isUtcOffset(): boolean;
    isValid(): boolean;
    isoWeek(): number;
    isoWeek(d): Moment;
    isoWeekYear(): number;
    isoWeekYear(d): Moment;
    isoWeekday(): number;
    isoWeekday(d): Moment;
    isoWeeks(): number;
    isoWeeks(d): Moment;
    isoWeeksInISOWeekYear(): number;
    isoWeeksInYear(): number;
    lang(language): Moment;
    lang(): Locale;
    local(keepLocalTime?): Moment;
    locale(): string;
    locale(locale): Moment;
    localeData(): Locale;
    max(inp?, format?, strict?): Moment;
    max(inp?, format?, language?, strict?): Moment;
    millisecond(ms): Moment;
    millisecond(): number;
    milliseconds(ms): Moment;
    milliseconds(): number;
    min(inp?, format?, strict?): Moment;
    min(inp?, format?, language?, strict?): Moment;
    minute(m): Moment;
    minute(): number;
    minutes(m): Moment;
    minutes(): number;
    month(M): Moment;
    month(): number;
    months(M): Moment;
    months(): number;
    parseZone(): Moment;
    parsingFlags(): MomentParsingFlags;
    propertyIsEnumerable(v): boolean;
    quarter(): number;
    quarter(q): Moment;
    quarters(): number;
    quarters(q): Moment;
    second(s): Moment;
    second(): number;
    seconds(s): Moment;
    seconds(): number;
    set(unit, value): Moment;
    set(objectLiteral): Moment;
    startOf(unitOfTime): Moment;
    subtract(amount?, unit?): Moment;
    subtract(unit, amount): Moment;
    to(inp, suffix?): string;
    toArray(): [number, number, number, number, number, number, number];
    toDate(): Date;
    toISOString(keepOffset?): string;
    toJSON(): string;
    toLocaleString(): string;
    toNow(withoutPrefix?): string;
    toObject(): MomentObjectOutput;
    toString(): string;
    tz(): undefined | string;
    tz(timezone, keepLocalTime?): Moment;
    unix(): number;
    utc(keepLocalTime?): Moment;
    utcOffset(): number;
    utcOffset(b, keepLocalTime?): Moment;
    valueOf(): number;
    week(): number;
    week(d): Moment;
    weekYear(): number;
    weekYear(d): Moment;
    weekday(): number;
    weekday(d): Moment;
    weeks(): number;
    weeks(d): Moment;
    weeksInYear(): number;
    year(y): Moment;
    year(): number;
    years(y): Moment;
    years(): number;
    zone(): number;
    zone(b): Moment;
    zoneAbbr(): string;
    zoneAbbr(): string;
    zoneName(): string;
    zoneName(): string;
}

Hierarchy

  • Object
    • Moment

Properties

constructor: Function

The initial value of Object.prototype.constructor is the standard built-in Object constructor.

Methods

  • Returns string

  • Parameters

    Returns string

  • Parameters

    Returns string

  • Parameters

    • d: number

    Returns Moment

  • Returns number

  • Parameters

    • d: number

    Returns Moment

    Deprecated

    use date(d)

  • Returns number

    Deprecated

    use date()

  • Parameters

    • d: string | number

    Returns Moment

  • Returns number

  • Returns number

  • Parameters

    • d: number

    Returns Moment

  • Parameters

    • d: string | number

    Returns Moment

  • Returns number

  • Returns number

  • Parameters

    Returns number

  • Parameters

    • Optional format: string

    Returns string

  • Parameters

    Returns string

  • Parameters

    • Optional withoutSuffix: boolean

    Returns string

  • Parameters

    Returns number

  • Parameters

    Returns boolean

  • Determines whether an object has a property with the specified name.

    Parameters

    • v: PropertyKey

      A property name.

    Returns boolean

  • Parameters

    • h: number

    Returns Moment

  • Returns number

  • Parameters

    • h: number

    Returns Moment

  • Returns number

  • Returns string

  • Returns number

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Returns boolean

  • Returns boolean

    Deprecated

    no reliable implementation

  • Returns boolean

  • Returns boolean

  • Determines whether an object exists in another object's prototype chain.

    Parameters

    • v: Object

      Another object whose prototype chain is to be checked.

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Returns boolean

  • Returns boolean

    Deprecated

    use isUTC

  • Returns boolean

  • Returns boolean

  • Returns number

  • Parameters

    • d: number

    Returns Moment

  • Returns number

  • Parameters

    • d: number

    Returns Moment

  • Returns number

  • Parameters

    • d: string | number

    Returns Moment

  • Returns number

  • Parameters

    • d: number

    Returns Moment

  • Returns number

  • Returns number

  • Parameters

    • Optional keepLocalTime: boolean

    Returns Moment

  • Parameters

    • ms: number

    Returns Moment

  • Returns number

  • Parameters

    • ms: number

    Returns Moment

  • Returns number

  • Parameters

    • m: number

    Returns Moment

  • Returns number

  • Parameters

    • m: number

    Returns Moment

  • Returns number

  • Parameters

    • M: string | number

    Returns Moment

  • Returns number

  • Parameters

    • M: string | number

    Returns Moment

    Deprecated

    use month(M)

  • Returns number

    Deprecated

    use month()

  • Determines whether a specified property is enumerable.

    Parameters

    • v: PropertyKey

      A property name.

    Returns boolean

  • Returns number

  • Parameters

    • q: number

    Returns Moment

  • Returns number

  • Parameters

    • q: number

    Returns Moment

  • Parameters

    • s: number

    Returns Moment

  • Returns number

  • Parameters

    • s: number

    Returns Moment

  • Returns number

  • Parameters

    Returns string

  • Returns [number, number, number, number, number, number, number]

  • Returns Date

  • Parameters

    • Optional keepOffset: boolean

    Returns string

  • Returns string

  • Returns a date converted to a string using the current locale.

    Returns string

  • Parameters

    • Optional withoutPrefix: boolean

    Returns string

  • Returns a string representation of an object.

    Returns string

  • Returns undefined | string

  • Parameters

    • timezone: string
    • Optional keepLocalTime: boolean

    Returns Moment

  • Returns number

  • Parameters

    • Optional keepLocalTime: boolean

    Returns Moment

  • Returns number

  • Parameters

    • b: string | number
    • Optional keepLocalTime: boolean

    Returns Moment

  • Returns number

    Unix timestamp in milliseconds

  • Returns number

  • Parameters

    • d: number

    Returns Moment

  • Returns number

  • Parameters

    • d: number

    Returns Moment

  • Returns number

  • Parameters

    • d: number

    Returns Moment

  • Returns number

  • Parameters

    • d: number

    Returns Moment

  • Returns number

  • Parameters

    • y: number

    Returns Moment

  • Returns number

  • Parameters

    • y: number

    Returns Moment

    Deprecated

    use year(y)

  • Returns number

    Deprecated

    use year()

  • Returns number

    Deprecated

    in favor of utcOffset

  • Parameters

    • b: string | number

    Returns Moment

  • Returns string

  • Returns string

  • Returns string

  • Returns string