Difference between revisions of "Template:Temperature/doc"
(Documentation for temperature differences) |
m (→Syntax) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Description == | == Description == | ||
This template is used to take a temperature value in Celsius, so it can then display both Celsius and Fahrenheit. | 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 == | == Syntax == | ||
Line 7: | Line 9: | ||
To display a range of temperatures, type <code>{{t|Temperature|X|Y}}</code> on the page to be marked, where X and Y are the bounds of your temperature range in Celsius. | To display a range of temperatures, type <code>{{t|Temperature|X|Y}}</code> 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 <code>{{ | + | To display a temperature difference rather than an absolute temperature type <code><nowiki>{{Temperature|X||delta}}</nowiki></code> or <code>{{t|Temperature|X|Y|delta}}</code>. |
== Example 1 == | == Example 1 == | ||
Line 20: | Line 22: | ||
== Example 3 == | == Example 3 == | ||
− | Absolute temperature range: <code><nowiki>{{Temperature|20|32 | + | Absolute temperature range: <code><nowiki>{{Temperature|20|32}}</nowiki></code> |
{{Temperature|20|32}} | {{Temperature|20|32}} |
Latest revision as of 15:19, 7 July 2022
Description[edit]
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[edit]
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[edit]
Absolute temperature: {{Temperature|20}}
20 °C (68 °F)
Example 2[edit]
Absolute temperature: {{Temperature|32}}
32 °C (89.6 °F)
Example 3[edit]
Absolute temperature range: {{Temperature|20|32}}
20 °C – 32 °C (68 °F – 89.6 °F)
Example 4[edit]
Temperature difference: {{Temperature|20||delta}}
20 °C (36 °F)
Example 5[edit]
Temperature difference range: {{Temperature|20|32|delta}}
20 °C – 32 °C (36 °F – 57.6 °F)