Formatting Numbers
Since ICU 60, the recommended mechanism for formatting numbers isNumberFormatter (Java).NumberFormatter supports the formatting of:
- Decimal Formatting
- Currencies
- Measurement Units
- Percentages
- Scientific Notation
- Compact Notation
For number ranges, including currency and measurement unit ranges, seeNumberRangeFormatter (Java).
For rule-based number formatting, including spellout rules and support for traditional numbering systems not covered by base-10 decimal digits, seerbnf.md.
For the classicNumberFormat class, which also includes legacy parsing support for localized number strings, seelegacy-numberformat.md.