Difference between revisions of "Template:Temperature"
(Wow that actually went surprisingly well) |
m |
||
Line 1: | Line 1: | ||
− | <onlyinclude>{{#if:{{{1|}}}|{{formatnum: {{#expr: {{{1|}}} }} }} {{H:title|link=no|Celsius|°C}} ({{formatnum: {{#expr: ((({{{1|}}}*9)/5)+32)round 2}} }}{{H:title|link=no|Celsius|°F}})}}<nowiki /></onlyinclude> | + | <onlyinclude>{{#if:{{{1|}}}|{{formatnum: {{#expr: {{{1|}}} }} }} {{H:title|link=no|Celsius|°C}} ({{formatnum: {{#expr: ((({{{1|}}}*9)/5)+32)round 2}} }}{{H:title|link=no|Celsius| °F}})}}<nowiki /></onlyinclude> |
<noinclude> | <noinclude> | ||
{{{{BASEPAGENAME}}/doc}} | {{{{BASEPAGENAME}}/doc}} | ||
[[Category:Templates|Main]] | [[Category:Templates|Main]] | ||
</noinclude> | </noinclude> |
Revision as of 09:47, 15 December 2016
Description
This template is used to take a temperature value in Celsius, so it can then display both Celsius and Fahrenheit.
The template accepts both numbers and expressions as inputs.
Syntax
Type {{Temperature|<X>}}
on the page to be marked, where X is your temperature value in Celsius.
To display a range of temperatures, type {{Temperature|<X>|<Y>}}
on the page to be marked, where X and Y are the bounds of your temperature range in Celsius.
To display a temperature difference rather than an absolute temperature type {{Temperature|X||delta}}
or {{Temperature|<X>|<Y>|<delta>}}
.
Example 1
Absolute temperature: {{Temperature|20}}
20 °C (68 °F)
Example 2
Absolute temperature: {{Temperature|32}}
32 °C (89.6 °F)
Example 3
Absolute temperature range: {{Temperature|20|32}}
20 °C (68 °F)
Example 4
Temperature difference: {{Temperature|20||delta}}
20 °C (68 °F)
Example 5
Temperature difference range: {{Temperature|20|32|delta}}
20 °C (68 °F)