API reference / @localizer/format-number / relativeDecimalFormatter
Function: relativeDecimalFormatter()
relativeDecimalFormatter<
T
>(options?
):RelativeValueFormatter
<T
>
Defined in: relativeDecimalFormatter.ts:33
Formats a value relative to a reference as a localized decimal string.
Type Parameters
Type Parameter | Description |
---|---|
T extends number | bigint | The type of values, either number or bigint . |
Parameters
Parameter | Type | Description |
---|---|---|
options? | NumberFormatOptions | Optional formatting options for relative decimal values. |
Returns
A function that formats the difference between a value and a reference using Intl.NumberFormat
.