Skip to content

Function formatTime()

formatTime(time: number, maxLength: number, allowAffixes: boolean): string

Source: date.utils.ts

Formats time in a human-readable format.

Parameters

time

number

Time in milliseconds.

maxLength

number = 3

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

allowAffixes

boolean = false

Returns

string

Built by Prozilla