relativePercent @localizer/format 1.1.3
Determines the percentage change between an initial value and a subsequent value, presenting the result in a formatted percentage style.
Usage
typescript
import { relativePercent } from '@localizer/format';
const result = relativePercent(35, 50);
The first argument specifies the initial reference value, representing the state before the change. The second argument defines the updated value, representing the state after the change.
Demo
Locale | Localized value |
---|---|
en-US | +43% |
fr-FR | +43 % |
de-DE | +43 % |
fi-FI | +43 % |
sv-FI | +43 % |
ko-KR | +43% |
hi-IN | +43% |