Methods
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
days
- days(): number
Returns number
get
- get(units): number
Returns number
hours
- hours(): number
Returns number
humanize
- humanize(argWithSuffix?, argThresholds?): string
Parameters
Optional
argWithSuffix: boolean
Returns string
- humanize(argThresholds?): string
Returns string
isValid
- isValid(): boolean
Returns boolean
locale
- locale(): string
Returns string
- locale(locale): Duration
milliseconds
- milliseconds(): number
Returns number
minutes
- minutes(): number
Returns number
months
- months(): number
Returns number
seconds
- seconds(): number
Returns number
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