Template:Cents: Difference between revisions
Jump to navigation
Jump to search
ready to go |
m Added See also section (to avoid confusion with a similar template) |
||
| Line 17: | Line 17: | ||
produces the following output | produces the following output | ||
1901.95500 | 1901.95500 | ||
== See also == | |||
* [[Template:Cent]] — a template to insert the cent symbol | |||
[[Category:Substituted templates]] | [[Category:Substituted templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 19:49, 6 February 2022
0
This template calculates the cent value of its first argument (defaults to 1). An optional second argument controls the precision, it defaults to 0 decimal places.
It must always be combined with the subst: keyword. The substitution is already carried out for the page preview. At save, the cent value is being placed into the wiki source.
Usage
Use this template like this
{{subst:cents|ratio|precision}}
Example
this input in the wiki source
{{subst:cents|3|5}}
produces the following output
1901.95500
See also
- Template:Cent — a template to insert the cent symbol