Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The currency filter formats a number as a monetary amount. It takes the optional, symbol parameter The filter takes the currency symbol as a parameter, whose default being value is $.

For example:

{{ 100 | currency }} returns $100

...

The percent filter formats a number as a percentage. It takes the optional, decimals parameter. The filter takes the currency symbol as a parameter, whose default being value is 0.

For example:

{{ 0.4512 | percentage }} returns 45%

...