Difference between revisions of "Template:F to C"
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
*'''num''' is a required parameter, which specifies the number of degrees Fahrenheit to be converted to degrees Celsius. Please do not format this parameter; i.e., use 1234 instead of 1,234. | *'''num''' is a required parameter, which specifies the number of degrees Fahrenheit to be converted to degrees Celsius. Please do not format this parameter; i.e., use 1234 instead of 1,234. | ||
*'''''precision''''' is the number of decimal digits in the converted value. The default value is 1. | *'''''precision''''' is the number of decimal digits in the converted value. The default value is 1. | ||
− | *'''''wiki''''' specifies whether the names of the units should be wikified or not and can take values of either ''yes'' or ''no''. The default value is ''no''.</noinclude><includeonly>{{#ifexpr:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}<0|−{{FORMATNUM:{{#expr:-{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}}}}}|{{#ifexpr:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}=0|0|{{FORMATNUM:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}}}}}}}{{#ifeq:{{{wiki|no}}}|no| ℉| [[Fahrenheit|℉]]}} ({{#ifexpr:({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}-32)/1.8 round {{{precision|1}}}<0|−{{FORMATNUM:{{#expr:-(({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}-32)/1.8 round {{{precision|1}}})}}}}|{{#ifexpr:({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}-32)/1.8 round {{{precision|1}}}=0|0|{{FORMATNUM:{{#expr:({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}-32)/1.8 round {{{precision|1}}}}}}}}}}}{{#ifeq:{{{wiki|no}}}|no| ℃| [[Celsius|℃]]}})</includeonly><noinclude>[[Category:Conversion templates|{{PAGENAME}}]]</noinclude> | + | *'''''wiki''''' specifies whether the names of the units should be wikified or not and can take values of either ''yes'' or ''no''. The default value is ''no''. |
+ | |||
+ | Compare: | ||
+ | |||
+ | :{{xpd5op3p3p3c||||||convert|66|||°F|||°C|d=}} | ||
+ | </noinclude><includeonly>{{#ifexpr:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}<0|−{{FORMATNUM:{{#expr:-{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}}}}}|{{#ifexpr:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}=0|0|{{FORMATNUM:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}}}}}}}{{#ifeq:{{{wiki|no}}}|no| ℉| [[Fahrenheit|℉]]}} ({{#ifexpr:({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}-32)/1.8 round {{{precision|1}}}<0|−{{FORMATNUM:{{#expr:-(({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}-32)/1.8 round {{{precision|1}}})}}}}|{{#ifexpr:({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}-32)/1.8 round {{{precision|1}}}=0|0|{{FORMATNUM:{{#expr:({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}-32)/1.8 round {{{precision|1}}}}}}}}}}}{{#ifeq:{{{wiki|no}}}|no| ℃| [[Celsius|℃]]}})</includeonly><noinclude>[[Category:Conversion templates|{{PAGENAME}}]]</noinclude> |
Latest revision as of 13:48, 1 September 2010
- Usage
- {{F to C | num | precision | wiki}}
- Examples
- Short notation: {{F to C|66}} → 66 ℉ (18.9 ℃)
- Full notation: {{F to C|num=66|precision=0|wiki=yes}} → 66 ℉ (19 ℃)
Italicized parameters are optional:
- num is a required parameter, which specifies the number of degrees Fahrenheit to be converted to degrees Celsius. Please do not format this parameter; i.e., use 1234 instead of 1,234.
- precision is the number of decimal digits in the converted value. The default value is 1.
- wiki specifies whether the names of the units should be wikified or not and can take values of either yes or no. The default value is no.
Compare:
{{convert|66|°F|°C}}
gives Template:Convert/°F [1]