Skip to content

Vizel API / core/src / formatRelativeTimeWithLocale

Function: formatRelativeTimeWithLocale() ​

ts
function formatRelativeTimeWithLocale(template, value): string;

Defined in: packages/core/src/i18n/utils.ts:95

Format a relative time string using locale templates. Replaces {n} placeholder with the numeric value.

Parameters ​

ParameterType
templatestring
valuenumber

Returns ​

string

Released under the MIT License.