Skip to content

API reference / @localizer/format-number / relativePercentFormatter

Function: relativePercentFormatter()

relativePercentFormatter<T>(options?): RelativeValueFormatter<T>

Defined in: relativePercentFormatter.ts:32

Formats values as localized relative percentages.

Type Parameters

Type ParameterDescription
T extends number | bigintThe numeric type, either number or bigint.

Parameters

ParameterTypeDescription
options?NumberFormatOptionsOptional formatting options.

Returns

RelativeValueFormatter<T>

A function to format a value relative to a reference as a percentage.