Returns a formatter with the given options. Function takes a number and the unit to format as
the second argument. The formatter will yield localized output, based on the users' selected
locale.
This differs from regular Intl.NumberFormat in two ways:
You do not need to instantiate a new formatter for each unit you want to format
(still happens behind the scenes, but is memoized)
The default unit display style (unitDisplay) is long
Returns a formatter with the given options. Function takes a number and the unit to format as the second argument. The formatter will yield localized output, based on the users' selected locale.
This differs from regular
Intl.NumberFormat
in two ways:unitDisplay
) islong