Difference between revisions of "Template:Format price/digits/doc"
Jump to navigation
Jump to search
test>MSGJ m (moved Template:Formatprice/digits/doc to Template:Format price/digits/doc: add space) |
test>The Evil IP address (recat) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| − | 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 {{tl| | + | 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 {{tl|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 === | === Usage === | ||
| − | {{tlx| | + | {{tlx|Format price/digits|number}} |
==== Examples ==== | ==== Examples ==== | ||
| − | * {{aye}} {{tlx| | + | * {{aye}} {{tlx|Format price/digits|0}} = {{Format price/digits|0}} |
| − | * {{aye}} {{tlx| | + | * {{aye}} {{tlx|Format price/digits|0.12345}} = {{Format price/digits|0.12345}} |
| − | * {{aye}} {{tlx| | + | * {{aye}} {{tlx|Format price/digits|1.23456}} = {{Format price/digits|1.23456}} |
| − | * {{aye}} {{tlx| | + | * {{aye}} {{tlx|Format price/digits|12.3456}} = {{Format price/digits|12.3456}} |
| − | * {{aye}} {{tlx| | + | * {{aye}} {{tlx|Format price/digits|123.456}} = {{Format price/digits|123.456}} |
| − | * {{nay}} {{tlx| | + | * {{nay}} {{tlx|Format price/digits|1234.56}} = {{Format price/digits|1234.56}} |
| − | * {{nay}} {{tlx| | + | * {{nay}} {{tlx|Format price/digits|-234.56}} = {{Format price/digits|-234.56}} |
=== See also === | === See also === | ||
| − | * {{tl| | + | * {{tl|Format price}} |
<includeonly> | <includeonly> | ||
{{DEFAULTSORT:{{BASEPAGENAME}}}} | {{DEFAULTSORT:{{BASEPAGENAME}}}} | ||
| − | [[Category: | + | [[Category:Currency]] |
| + | [[Category:Currency conversion templates]] | ||
| + | [[Category:Economics templates]] | ||
| + | [[Category:Finance templates]] | ||
</includeonly> | </includeonly> | ||
Revision as of 20:58, 16 August 2011
| 40px | This is a documentation subpage for Template:Format price/digits. It contains usage information, categories and other content that is not part of the original template page. |
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}}