formatCurrency
Formats a number as currency using locale rules.
formatCurrency(value: number, locale: string, currency: string, currencyCode?: string, digitsInfo?: string): string
Parameters
| value |
Type: |
| locale |
Type: |
| currency |
Type: |
| currencyCode |
Type: Optional. Default is |
| digitsInfo |
Type: Optional. Default is |
Returns
string
Description
Use currency to format a number as currency.
Where:
valueis a number.localeis astringdefining the locale to use.currencyis the string that represents the currency, it can be its symbol or its name.currencyCodeis the ISO 4217 currency code, such asUSDfor the US dollar andEURfor the euro.digitInfoSeeDecimalPipefor more details.