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: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.