Skip to content

fixedUnitRangeFormatter
@localizer/format-number 1.1.1

A customizable formatter designed for representing ranges of measurement values with a fixed, predefined unit.

Usage

typescript
import { 
fixedUnitRangeFormatter
} from '@localizer/format-number';
const
formatter
=
fixedUnitRangeFormatter
('byte', {
unitDisplay
: 'narrow',
maximumSignificantDigits
: 2,
notation
: 'compact',
}); const
result
=
formatter
(1200000, 1440000);

See formatter options for configuration details.

Demo

compact
─── unset ───
─── unset ───
─── unset ───
─── unset ───
narrow
─── unset ───
─── unset ───
─── unset ───
─── unset ───
─── unset ───
─── unset ───
─── unset ───
─── unset ───
byte
Please Select
LocaleLocalized value
en-US  American English1,200,000–1,440,000 byte
fr-FR  French (France)1 200 000–1 440 000 o
de-DE  German (Germany)1.200.000–1.440.000 Byte
fi-FI  Finnish (Finland)1 200 000–1 440 000 t
sv-FI  Swedish (Finland)1 200 000‒1 440 000 B
ko-KR  Korean (South Korea)1,200,000~1,440,000byte
hi-IN  Hindi (India)12,00,000–14,40,000 बाइट

See also