.. 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:
* ``decimal_point``: The character(s) to use for the decimal point
* ``thousand_sep``: The character(s) to use for the thousands separator
-.. _`number_format`: http://php.net/number_format
+.. _`number_format`: https://secure.php.net/number_format