Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Object
    • Moment

Index

Properties

constructor

constructor: Function

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

Methods

add

calendar

clone

creationData

date

  • date(d: number): Moment
  • date(): number
  • Parameters

    • d: number

    Returns Moment

  • Returns number

dates

  • dates(d: number): Moment
  • dates(): number
  • deprecated

    use date(d)

    Parameters

    • d: number

    Returns Moment

  • deprecated

    use date()

    Returns number

day

  • day(d: string | number): Moment
  • day(): number
  • Parameters

    • d: string | number

    Returns Moment

  • Returns number

dayOfYear

  • dayOfYear(): number
  • dayOfYear(d: number): Moment
  • Returns number

  • Parameters

    • d: number

    Returns Moment

days

  • days(d: string | number): Moment
  • days(): number
  • Parameters

    • d: string | number

    Returns Moment

  • Returns number

daysInMonth

  • daysInMonth(): number
  • Returns number

diff

  • Parameters

    Returns number

endOf

format

  • format(format?: string): string
  • Parameters

    • Optional format: string

    Returns string

from

  • Parameters

    Returns string

fromNow

  • fromNow(withoutSuffix?: boolean): string
  • Parameters

    • Optional withoutSuffix: boolean

    Returns string

get

  • get(unit: All): number
  • Parameters

    Returns number

hasAlignedHourOffset

hasOwnProperty

  • hasOwnProperty(v: PropertyKey): boolean
  • Determines whether an object has a property with the specified name.

    Parameters

    • v: PropertyKey

      A property name.

    Returns boolean

hour

  • hour(h: number): Moment
  • hour(): number
  • Parameters

    • h: number

    Returns Moment

  • Returns number

hours

  • hours(h: number): Moment
  • hours(): number
  • Parameters

    • h: number

    Returns Moment

  • Returns number

inspect

  • inspect(): string
  • Returns string

invalidAt

  • invalidAt(): number
  • Returns number

isAfter

isBefore

isBetween

isDST

  • isDST(): boolean
  • Returns boolean

isDSTShifted

  • isDSTShifted(): boolean
  • deprecated

    no reliable implementation

    Returns boolean

isLeapYear

  • isLeapYear(): boolean
  • Returns boolean

isLocal

  • isLocal(): boolean
  • Returns boolean

isPrototypeOf

  • isPrototypeOf(v: Object): 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

isSame

isSameOrAfter

isSameOrBefore

isUTC

  • isUTC(): boolean
  • Returns boolean

isUtc

  • isUtc(): boolean
  • deprecated

    use isUTC

    Returns boolean

isUtcOffset

  • isUtcOffset(): boolean
  • Returns boolean

isValid

  • isValid(): boolean
  • Returns boolean

isoWeek

  • isoWeek(): number
  • isoWeek(d: number): Moment
  • Returns number

  • Parameters

    • d: number

    Returns Moment

isoWeekYear

  • isoWeekYear(): number
  • isoWeekYear(d: number): Moment
  • Returns number

  • Parameters

    • d: number

    Returns Moment

isoWeekday

  • isoWeekday(): number
  • isoWeekday(d: string | number): Moment
  • Returns number

  • Parameters

    • d: string | number

    Returns Moment

isoWeeks

  • isoWeeks(): number
  • isoWeeks(d: number): Moment
  • Returns number

  • Parameters

    • d: number

    Returns Moment

isoWeeksInISOWeekYear

  • isoWeeksInISOWeekYear(): number
  • Returns number

isoWeeksInYear

  • isoWeeksInYear(): number
  • Returns number

lang

local

  • local(keepLocalTime?: boolean): Moment
  • Parameters

    • Optional keepLocalTime: boolean

    Returns Moment

locale

localeData

max

millisecond

  • millisecond(ms: number): Moment
  • millisecond(): number
  • Parameters

    • ms: number

    Returns Moment

  • Returns number

milliseconds

  • milliseconds(ms: number): Moment
  • milliseconds(): number
  • Parameters

    • ms: number

    Returns Moment

  • Returns number

min

minute

  • minute(m: number): Moment
  • minute(): number
  • Parameters

    • m: number

    Returns Moment

  • Returns number

minutes

  • minutes(m: number): Moment
  • minutes(): number
  • Parameters

    • m: number

    Returns Moment

  • Returns number

month

  • month(M: string | number): Moment
  • month(): number
  • Parameters

    • M: string | number

    Returns Moment

  • Returns number

months

  • months(M: string | number): Moment
  • months(): number
  • deprecated

    use month(M)

    Parameters

    • M: string | number

    Returns Moment

  • deprecated

    use month()

    Returns number

parseZone

parsingFlags

propertyIsEnumerable

  • propertyIsEnumerable(v: PropertyKey): boolean
  • Determines whether a specified property is enumerable.

    Parameters

    • v: PropertyKey

      A property name.

    Returns boolean

quarter

  • quarter(): number
  • quarter(q: number): Moment
  • Returns number

  • Parameters

    • q: number

    Returns Moment

quarters

  • quarters(): number
  • quarters(q: number): Moment
  • Returns number

  • Parameters

    • q: number

    Returns Moment

second

  • second(s: number): Moment
  • second(): number
  • Parameters

    • s: number

    Returns Moment

  • Returns number

seconds

  • seconds(s: number): Moment
  • seconds(): number
  • Parameters

    • s: number

    Returns Moment

  • Returns number

set

startOf

subtract

to

  • Parameters

    Returns string

toArray

  • toArray(): number[]
  • Returns number[]

toDate

toISOString

  • toISOString(keepOffset?: boolean): string
  • Parameters

    • Optional keepOffset: boolean

    Returns string

toJSON

  • toJSON(): string
  • Returns string

toLocaleString

  • toLocaleString(): string
  • Returns a date converted to a string using the current locale.

    Returns string

toNow

  • toNow(withoutPrefix?: boolean): string
  • Parameters

    • Optional withoutPrefix: boolean

    Returns string

toObject

toString

  • toString(): string
  • Returns a string representation of an object.

    Returns string

tz

  • tz(): undefined | string
  • tz(timezone: string, keepLocalTime?: boolean): Moment
  • Returns undefined | string

  • Parameters

    • timezone: string
    • Optional keepLocalTime: boolean

    Returns Moment

unix

  • unix(): number
  • Returns number

utc

  • utc(keepLocalTime?: boolean): Moment
  • Parameters

    • Optional keepLocalTime: boolean

    Returns Moment

utcOffset

  • utcOffset(): number
  • utcOffset(b: string | number, keepLocalTime?: boolean): Moment
  • Returns number

  • Parameters

    • b: string | number
    • Optional keepLocalTime: boolean

    Returns Moment

valueOf

  • valueOf(): number
  • Returns number

    Unix timestamp in milliseconds

week

  • week(): number
  • week(d: number): Moment
  • Returns number

  • Parameters

    • d: number

    Returns Moment

weekYear

  • weekYear(): number
  • weekYear(d: number): Moment
  • Returns number

  • Parameters

    • d: number

    Returns Moment

weekday

  • weekday(): number
  • weekday(d: number): Moment
  • Returns number

  • Parameters

    • d: number

    Returns Moment

weeks

  • weeks(): number
  • weeks(d: number): Moment
  • Returns number

  • Parameters

    • d: number

    Returns Moment

weeksInYear

  • weeksInYear(): number
  • Returns number

year

  • year(y: number): Moment
  • year(): number
  • Parameters

    • y: number

    Returns Moment

  • Returns number

years

  • years(y: number): Moment
  • years(): number
  • deprecated

    use year(y)

    Parameters

    • y: number

    Returns Moment

  • deprecated

    use year()

    Returns number

zone

  • zone(): number
  • zone(b: string | number): Moment
  • deprecated

    in favor of utcOffset

    Returns number

  • Parameters

    • b: string | number

    Returns Moment

zoneAbbr

  • zoneAbbr(): string
  • zoneAbbr(): string
  • Returns string

  • Returns string

zoneName

  • zoneName(): string
  • zoneName(): string
  • Returns string

  • Returns string

Generated using TypeDoc