Template:Format price/digits/doc
Appearance
This is a documentation subpage for Template:Format price/digits. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on approximately 9,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
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
[edit]{{Format price/digits|number}}
Examples
[edit]-
{{Format price/digits|0}}
= 0 -
{{Format price/digits|0.12345}}
= 0.12 -
{{Format price/digits|1.23456}}
= 1.23 -
{{Format price/digits|12.3456}}
= 12.3 -
{{Format price/digits|123.456}}
= 123 -
{{Format price/digits|1234.56}}
= 1235 -
{{Format price/digits|-234.56}}
= -234.56
See also
[edit]- {{Format price}}