formatQuantity Method

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

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

@returns the formatted 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: 16 April, 2024