format.number ViewHelper <f:format.number>

Formats a number with custom precision, decimal point and grouped thousands. See https://www.php.net/manual/function.number-format.php.

Examples

Defaults

<f:format.number>423423.234</f:format.number>
Copied!

423,423.20

With all parameters

<f:format.number decimals="1" decimalSeparator="," thousandsSeparator=".">
    423423.234
</f:format.number>
Copied!

423.423,2

Arguments

decimals

DataType
mixed
Default
'2'
Required
false
Description
The number of digits after the decimal point

decimalSeparator

DataType
string
Default
'.'
Required
false
Description
The decimal point character

thousandsSeparator

DataType
string
Default
','
Required
false
Description
The character for grouping the thousand digits