enkidatron/elm-cldr/2.3.0

NOTE: the latest version is 3.2.1

Cldr.Format.Number

Number Formatting

format : FormatType -> Locale -> Float -> String

Formats a Float using the specified Locale.

import Cldr.Locale exposing (en)


format Decimal en 123456789
--> "123,456,789"

Format Type

= Decimal
| Currency CurrencyCode
| Percent

Numbers can be formatted as decimals, currency, or percentages.

A CurrencyCode is just a String.