f:format.number

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

Properties

decimals

Variable type
Integer
Description
The number of digits after the decimal point.
Default value
2
Mandatory
No

decimalSeparator

Variable type
String
Description
The decimal point character.
Default value
.
Mandatory
No

thousandsSeparator

Variable type
String
Description
The character for grouping the thousand digits.
Default value
,
Mandatory
No

Examples

Defaults

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

423,423.23

With all parameters

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

423.423,2
<f:format.number decimals="3" decimalSeparator="." thousandsSeparator=",">1122334455.667788</f:format.number>

1,122,334,455.668