formatQuantity Method

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

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

@returns the formatted string.

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

Returns - string

the formatted string.

Defined in

Last Updated: 17 December, 2024