Attention

TYPO3 v9 has reached its end-of-life September 30th, 2021 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.

You can order Extended Long Term Support (ELTS) here: TYPO3 ELTS.

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>

423,423.20

With all parameters

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

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