formatQuantity Method

Generates a formatted string for a quantity given its format spec.

formatQuantity(magnitude: number, formatSpec: undefined | FormatterSpec): string

Parameter Type Description
magnitude number The magnitude of the quantity.
formatSpec undefined | FormatterSpec The format specification. See methods getFormatterSpecByQuantityType and findFormatterSpecByQuantityType.

Returns - string

the formatted string.

Defined in

Last Updated: 30 November, 2023