Skip to content

Function formatRelativeTime()

formatRelativeTime(date: Date, maxLength: number, allowAffixes: boolean): string

Source: date.utils.ts

Format a time relative to now

Parameters

date

Date

The date

maxLength

number = 3

The maximum amount of units, e.g.: 3 => years, months, days

allowAffixes

boolean

Returns

string

Built by Prozilla