docs/docs/en/template-print/syntax/formatters/currency-formatting.md
Formats a currency number and allows specifying the number of decimals or a particular output format.
Parameters:
'M': outputs only the main currency name.'L': outputs the number along with the currency symbol (default).'LL': outputs the number along with the main currency name.'1000.456':formatC() // Outputs "$2,000.91"
'1000.456':formatC('M') // Outputs "dollars"
'1':formatC('M') // Outputs "dollar"
'1000':formatC('L') // Outputs "$2,000.00"
'1000':formatC('LL') // Outputs "2,000.00 dollars"
The output depends on the API options and exchange rate settings.
Converts a number from one currency to another. The exchange rate can be passed via API options or set globally.
If no parameters are specified, the conversion is automatically performed from options.currencySource to options.currencyTarget.
Parameters:
options.currencyTarget).options.currencySource).10:convCurr() // Outputs 20
1000:convCurr() // Outputs 2000
1000:convCurr('EUR') // Outputs 1000
1000:convCurr('USD') // Outputs 2000
1000:convCurr('USD', 'USD') // Outputs 1000
The output is the converted currency value.