General Disclaimer:   (HV) (DC) injury or death hazard,   use at your own risk,   may void warranty.

Difference between revisions of "Template:Mpg"

From My wiki
Jump to navigation Jump to search
(update to current version at Wikipedia.)
(update from W:Template:Mpg)
 
Line 1: Line 1:
<includeonly>{{{1}}}&nbsp;{{#switch:{{{lk|}}}|on=[[W:Miles per gallon|mpg]]|=mpg}} ({{#expr: ( 1 / {{{1}}} * 100 ) * 3.78541178 / 1.609344 round 2}}&nbsp;{{#switch:{{{lk|}}}|on=[[W:L/100 km|L/100&nbsp;km]]|=L/100&nbsp;km}})</includeonly><noinclude>
+
<includeonly>{{{1}}}&nbsp;{{#switch:{{{lk|}}}|on=[[W:Miles per gallon|mpg&ndash;U.S.]]|=mpg&ndash;U.S.}} ({{#expr: ( 1 / {{{1}}} * 100 ) * 3.78541178 / 1.609344 round 2}}&nbsp;{{#switch:{{{lk|}}}|on=[[W:L/100 km|L/100&nbsp;km]]|=L/100&nbsp;km}}&nbsp;/&nbsp;{{#expr:{{{1}}}* 1.20105680 round 1}}&nbsp;{{#switch:{{{lk|}}}|on=[[W:Imperial MPG|mpg&ndash;imp]]|=mpg&ndash;imp}})</includeonly><noinclude>
Template to convert fuel mileage form US mpg into Liters per 100km and display both via:
+
 
:<nowiki> {{{1}}}&nbsp;mpg {{#expr: ( 1 / {{{1}}} * 100 ) * 3.78541178 / 1.609344 round 2}}&nbsp;L/100&nbsp;km)</nowiki>
+
Template to convert fuel mileage from US mpg into Liters per 100&nbsp;km and imperial mpg and display all three via:
 +
:<nowiki> {{{1}}}&nbsp;mpg&ndash;U.S. {{#expr: ( 1 / {{{1}}} * 100 ) * 3.78541178 / 1.609344 round 2}}&nbsp;L/100&nbsp;km&nbsp;/&nbsp;{{{1}}}* 1.20105680 round 1}}&nbsp;mpg&ndash;imp)</nowiki>
 
Useage:
 
Useage:
 
*<nowiki>{{mpg|45}}</nowiki> results in {{mpg|45}}
 
*<nowiki>{{mpg|45}}</nowiki> results in {{mpg|45}}
Line 11: Line 12:
  
 
See also:
 
See also:
 +
* [[Template:Mpg (Imperial)]] - For Imperial (UK) gallons version
 
* [[Template:L100km]]
 
* [[Template:L100km]]
 
* [[W:Template:Convert]]
 
* [[W:Template:Convert]]
 +
 
</noinclude>
 
</noinclude>

Latest revision as of 11:33, 15 January 2008


Template to convert fuel mileage from US mpg into Liters per 100 km and imperial mpg and display all three via:

{{{1}}} mpg–U.S. {{#expr: ( 1 / {{{1}}} * 100 ) * 3.78541178 / 1.609344 round 2}} L/100 km / {{{1}}}* 1.20105680 round 1}} mpg–imp)

Useage:

  • {{mpg|45}} results in 45 mpg–U.S. (5.23 L/100 km / 54 mpg–imp)
  • {{mpg|45|lk=on}} results in 45 mpg–U.S. (5.23 L/100 km / 54 mpg–imp)

Options:

See also: