Template:Format price/testcases
| This is the template test cases page for the sandbox of Template:Format price. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Normal cases
[edit]{{Format price|7.2 }}
{{Format price}}
7.20
7.20
{{Format price|8.1 }}
{{Format price}}
8.10
8.10
{{Format price|8.2 }}
{{Format price}}
8.20
8.20
{{Format price|9.2 }}
{{Format price}}
9.20
9.20
{{Format price|456.789 }}
{{Format price}}
456.79
456.79
{{Format price|456.789|1 }}
{{Format price}}
456.80
456.80
{{Format price|456.789|0 }}
{{Format price}}
457
457
{{Format price|456.789|-2 }}
{{Format price}}
500
500
{{Format price|456.789|1234 }}
{{Format price}}
456.789
456.789
{{Format price|456.789|12345 }}
{{Format price}}
456.789
456.789
{{Format price|456.789|123456 }}
{{Format price}}
456.789
456.789
{{Format price|456.789|1000000 }}
{{Format price}}
456.789
456.789
{{Format price|2220}}
{{Format price}}
2,220
2,220
{{Format price|22222}}
{{Format price}}
22,222
22,222
{{Format price|222220}}
{{Format price}}
222,220
222,220
{{Format price|2222200}}
{{Format price}}
2.22 million
2.22 million
{{Format price|22222000}}
{{Format price}}
22.2 million
22.2 million
{{Format price|999900 }}
{{Format price}}
999,900
999,900
{{Format price|1000000 }}
{{Format price}}
1 million
1 million
{{Format price|98765432109876 }}
{{Format price}}
98.8 trillion
98.8 trillion
{{Format price|7.86E+25 }}
{{Format price}}
78.6 septillion
78.6 septillion
{{Format price|((79771849030+80552832168)/2)+((47671363636+47143879668)/2)+((32195134855+29842413462)/2)+((18434596154+18018778195)/2)}}
{{Format price}}
177 billion
177 billion
Error cases
[edit]{{Format price|}}
{{Format price}}
Format price error: cannot parse value ""
Format price error: cannot parse value ""
{{Format price||0}}
{{Format price}}
Format price error: cannot parse value ""
Format price error: cannot parse value ""
{{Format price|-100}}
{{Format price}}
Format price error: cannot parse value "-100"
Format price error: cannot parse value "-100"
{{Format price|xyz|A}}
{{Format price}}
Format price error: cannot parse value "xyz"
Format price error: cannot parse value "xyz"
Text following
[edit]= 78.6 septillion atoms{{Format price|7.86178E+25}}atoms= 78.6 septillion atoms{{Format price/sandbox|7.86178E+25}}atoms
Rounding problems
[edit]{{Format price|1000 }}
{{Format price}}
1,000
1,000
{{Format price|999.999 }}
{{Format price}}
1,000.00
1,000.00
Wrapping Template:Inflation
[edit]{{Format price|3.0906403940887e+14}}
{{Format price}}
309 trillion
309 trillion
{{Format price|2115663 }}
{{Format price}}
2.12 million
2.12 million
{{Format price|2006103 }}
{{Format price}}
2.01 million
2.01 million
{{Format price|765689 }}
{{Format price}}
765,689
765,689
{{Format price|1056427090.532}}
{{Format price}}
1.06 billion
1.06 billion