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

Difference between revisions of "Template:L100km"

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

Latest revision as of 11:40, 15 January 2008

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

{{{1}}} L/100 km ({{#expr: 1 / ( {{{1}}} * 1.609344 / 3.78541179 ) * 100 round 0}} mpg–U.S. / {{{1}}} L/100 km ({{#expr: 1 / ( {{{1}}} * 1.609344 / 4.54609) * 100 round 0}} mpg–imp)

Useage:

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

Options:

See also: