Methods
abs
- abs(): Duration
add
- add(inp?, unit?): Duration
as
- as(units): number
Returns number
asDays
- asDays(): number
Returns number
asHours
- asHours(): number
Returns number
asMilliseconds
- asMilliseconds(): number
Returns number
asMinutes
- asMinutes(): number
Returns number
asMonths
- asMonths(): number
Returns number
asSeconds
- asSeconds(): number
Returns number
asWeeks
- asWeeks(): number
Returns number
asYears
- asYears(): number
Returns number
clone
- clone(): Duration
days
- days(): number
Returns number
get
- get(units): number
Returns number
hours
- hours(): number
Returns number
humanize
- humanize(argWithSuffix?, argThresholds?): string
Returns string
- humanize(argThresholds?): string
Returns string
isValid
- isValid(): boolean
Returns boolean
lang
- lang(locale): Moment
- lang(): Locale
locale
- locale(): string
Returns string
- locale(locale): Duration
localeData
- localeData(): Locale
milliseconds
- milliseconds(): number
Returns number
minutes
- minutes(): number
Returns number
months
- months(): number
Returns number
seconds
- seconds(): number
Returns number
subtract
- subtract(inp?, unit?): Duration
toISOString
- toISOString(): string
Returns string
toIsoString
- toIsoString(): string
Returns string
toJSON
- toJSON(): string
Returns string
weeks
- weeks(): number
Returns number
years
- years(): number
Returns number
Deprecated
since version 2.8.0