Template:Format price/digits
< Template:Format price
Jump to navigation
Jump to search
Revision as of 07:32, 16 September 2010 by test>Courcelles (Protected Template:Format price/digits: Restore prior protection ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
1
This sub-template takes a number and reformats it to only 3 digits and a dot (if needed), provided it's in the 0–999.9999..... range. It's used internally by {{Format price}} for producing pleasant looking numbers, and isn't meant to be called directly. Its behavior outside the specified range isn't planned for and will result in an undefined, although probably consistent (in some way), result.
Usage
{{Format price/digits|number}}
Examples
- 13px
{{Format price/digits|0}}= 0 - 13px
{{Format price/digits|0.12345}}= 0.12 - 13px
{{Format price/digits|1.23456}}= 1.23 - 13px
{{Format price/digits|12.3456}}= 12.3 - 13px
{{Format price/digits|123.456}}= 123 - 13px
{{Format price/digits|1234.56}}= 1235 - 13px
{{Format price/digits|-234.56}}= -234.56
See also
- {{Format price}}
| The above documentation is transcluded from Template:Format price/digits/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |