Skip to content

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

LocaleLocalized value
en-US  American English+43%
fr-FR  French (France)+43 %
de-DE  German (Germany)+43 %
fi-FI  Finnish (Finland)+43 %
sv-FI  Swedish (Finland)+43 %
ko-KR  Korean (South Korea)+43%
hi-IN  Hindi (India)+43%

See also