Skip to content

Function formatRelativeTime() ​

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

Source: date.utils.ts

Formats 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 = false

Returns ​

string

Built by Prozilla