Difference between revisions of "Template:Format price/digits/doc"

From blackwiki
Jump to navigation Jump to search
test>Alexander Gieg
(Namespace update)
test>Alexander Gieg
(→‎Examples: Add "wrong" parameters)
Line 8: Line 8:
 
==== Examples ====
 
==== Examples ====
  
* {{tlx|Formatprice/digits|0}} = {{Formatprice/digits|0}}
+
* {{aye}} {{tlx|Formatprice/digits|0}} = {{Formatprice/digits|0}}
* {{tlx|Formatprice/digits|0.12345}} = {{Formatprice/digits|0.12345}}
+
* {{aye}} {{tlx|Formatprice/digits|0.12345}} = {{Formatprice/digits|0.12345}}
* {{tlx|Formatprice/digits|1.23456}} = {{Formatprice/digits|1.23456}}
+
* {{aye}} {{tlx|Formatprice/digits|1.23456}} = {{Formatprice/digits|1.23456}}
* {{tlx|Formatprice/digits|12.3456}} = {{Formatprice/digits|12.3456}}
+
* {{aye}} {{tlx|Formatprice/digits|12.3456}} = {{Formatprice/digits|12.3456}}
* {{tlx|Formatprice/digits|123.456}} = {{Formatprice/digits|123.456}}
+
* {{aye}} {{tlx|Formatprice/digits|123.456}} = {{Formatprice/digits|123.456}}
 +
* {{nay}} {{tlx|Formatprice/digits|1234.56}} = {{Formatprice/digits|1234.56}}
 +
* {{nay}} {{tlx|Formatprice/digits|-234.56}} = {{Formatprice/digits|-234.56}}
  
 
=== See also ===
 
=== See also ===

Revision as of 13:36, 6 June 2008

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 {{Formatprice}} 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

{{Formatprice/digits|number}}

Examples

See also