Package

ViewHelpers

ViewHelper Documentation

format.number

Formats a number with custom precision, decimal point and grouped thousands.

= Examples =

<f:format.number>423423.234</f:format.number> 423,423.20

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

{someNumber -> f:format.number(forceLocale: true)} 54.321,00 (depending on the value of {someNumber} and the current locale)

{someNumber -> f:format.currency(forceLocale: 'de_DE')} 54.321,00 (depending on the value of {someNumber})

Arguments

forceLocale anySimpleType

Whether if, and what, Locale should be used. May be boolean, string or \Neos\Flow\I18n\Locale

decimals integer

The number of digits after the decimal point

decimalSeparator string

The decimal point character

thousandsSeparator string

The character for grouping the thousand digits

localeFormatLength string

Format length if locale set in $forceLocale. Must be one of Neos\Flow\I18n\Cldr\Reader\NumbersReader::FORMAT_LENGTH_*'s constants.

ViewHelper Resources

Schema Resources