mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-05 18:54:56 +00:00
29 lines
758 B
Plaintext
29 lines
758 B
Plaintext
--TEST--
|
|
"format_number" filter
|
|
--TEMPLATE--
|
|
{{ '12.345'|format_number }}
|
|
{{ '12.345'|format_number(locale='fr') }}
|
|
{{ '12.345'|format_number(style='percent') }}
|
|
{{ '12.345'|format_number(style='spellout') }}
|
|
{{ '12.345'|format_percent_number }}
|
|
{{ '12.345'|format_spellout_number }}
|
|
{{ '80.345'|format_spellout_number(locale='fr_FR') }}
|
|
{{ '80.345'|format_spellout_number(locale='fr_CH') }}
|
|
{{ '12'|format_duration_number }}
|
|
{{ '0.12'|format_percent_number({fraction_digit: 1}) }}
|
|
{{ '0.12345'|format_percent_number({rounding_mode: 'ceiling'}) }}
|
|
--DATA--
|
|
return [];
|
|
--EXPECT--
|
|
12.345
|
|
12,345
|
|
1,234%
|
|
twelve point three four five
|
|
1,234%
|
|
twelve point three four five
|
|
quatre-vingts virgule trois quatre cinq
|
|
huitante virgule trois quatre cinq
|
|
12 sec.
|
|
12.0%
|
|
13%
|