mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-08 16:36:58 +00:00
Create number_format.rst
This commit is contained in:
committed by
Fabien Potencier
parent
d54355e9e1
commit
54f0f7ae1c
@@ -24,7 +24,7 @@ Twig's :ref:`precedence of operators <twig-expressions>`:
|
||||
.. code-block:: jinja
|
||||
|
||||
{{ -9800.333|number_format(2, '.', ',') }} {# outputs : -9 #}
|
||||
{{ (-9800.333)|number_format(2, '.', ',') }} {# outputs : -9.800,33 #}
|
||||
{{ (-9800.333)|number_format(2, '.', ',') }} {# outputs : -9,800.33 #}
|
||||
|
||||
If no formatting options are provided then Twig will use the default formatting
|
||||
options of:
|
||||
|
||||
Reference in New Issue
Block a user