Template:Formatprice/doc

From Wikipedia, the free encyclopedia

This is a documentation subpage for Template:Formatprice (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

This template display numbers typically representing prices in a pleasant way, ideally suited for articles. Numbers above one million are reduced down and rounded to a total of three digits followed by a multiplier text, and smaller numbers received separators and exactly two digits to represent cents, what doesn't always happen with the {{formatnum:}} magic word.

[edit] Usage

{{Formatprice|value|digits}}

Where:

  • value – the value that will be formatted and displayed (required).
  • digits – sets the digit in which a value lower than one million must be rounded, defaulting to "2" (cents) if unspecified.

Providing non-numeric parameters, failing to provide any parameter, or providing a negative value parameter, result all in a link to the NaN article.

[edit] Examples

[edit] See also