relativeCurrencyFormatter @localizer/format-number 1.1.1
A customizable formatter designed to represent absolute monetary changes using a specified currency. It simplifies the comparison between an initial and updated value, making it easier to interpret financial differences.
Usage
typescript
import { relativeCurrencyFormatter } from '@localizer/format-number';
const formatter = relativeCurrencyFormatter('EUR', {
notation: 'compact',
compactDisplay: 'long',
});
const result = formatter(3500, 5000);
Represents the change from an initial reference value (first argument) to an updated value (second argument).
See formatter options for configuration details.
Demo
Locale | Localized value |
---|---|
en-US | +€1,500.00 |
fr-FR | +1 500,00 € |
de-DE | +1.500,00 € |
fi-FI | +1 500,00 € |
sv-FI | +1 500,00 € |
ko-KR | +€1,500.00 |
hi-IN | +€1,500.00 |