Template:Percent/doc
Jump to navigation
Jump to search
This template is used to apply a standard format to percentage values in an input string.
Usage
{{ percent | <input string> }}
- First unnamed parameter
The input string. The template will detect and process the following:
- Percentages (natural and decimal, positive and negative)
- Decimals (positive and negative)
- Fractions (positive and negative)
- Any other valid {{#expr:}} string
Notes
- Decimals, fractions, and the results of other expressions will be rounded to two decimal places.
- If the input string does not consist of any of the valid formats outlined above, a percentage sign will be simply be added to it.
- The template is faster if the percentage sign is omitted. Therefore, if the input (or the result of it, if it is an expression) is purely numerical, the percentage sign should be left out.