Template talk:Temperature/Archive
Examples
[edit]*{{temperature|celsius=100}} *{{temperature|fahrenheit=32}} *{{temperature|celsius=50.000|fahrenheit=50.000}} <= just to show that if both values are given, no checks or changes are performed on the values. *{{temperature|celsius=-124.12}} *{{temperature|fahrenheit=-124.12}}
Minus sign
[edit]Hello, I've just discovered this template, and I find it very useful. However, when dealing with negative values it only accept the plain ASCII minus-hyphen character ('-'), and not the more correct −
HTML entity or minus Unicode character ('−'). Can this be solved? Best regards. --surueña 08:05, 21 June 2006 (UTC)
- There, fixed it now to convert to the proper − sign for negative values when showing the results! (Made a new template for this, Template:ProperMinus. You still need to input the normal - sign when using the template though. --Mythril 13:56, 21 June 2006 (UTC)
- Thanks! Maybe we can also warn developers about this bug, what do you think? --surueña 14:49, 21 June 2006 (UTC)
- Hmm, I dunno, I guess most script engines/programming languages use the standard ASCII - sign for calculations, so that's why it's used when doing math expressions in Wikipedia... But I guess we *could* ask about it. Not sure where though.--Mythril 22:30, 21 June 2006 (UTC)
- http://bugzilla.wikipedia.org/ is the place. Maybe we can propose to accept all those characters (plain '-' as well as
−
,−
,−
and '−'), and also that the−
should be returned. --surueña 07:33, 22 June 2006 (UTC)
- http://bugzilla.wikipedia.org/ is the place. Maybe we can propose to accept all those characters (plain '-' as well as
- [1] <= This bug report seems to cover it already? --Mythril 17:27, 22 June 2006 (UTC)
Kelvin
[edit]Would it be possible to add the Kelvin-scale as an optional parameter to this template. For scientific uses a lot of sources use the SI-unit Kelvin. --Donar Reiskoffer 12:55, 28 June 2006 (UTC)
- Hmm, well, I have thought about it, but I just thought that in cases where Kelvin is preferred, there's no need to state the Celsius or Fahrenheit temperature at all? If Kelvin is to be added, a lot more conditionals might need to be added, so I'd rather not add Kelvin if possible (though I guess variables could be used..). Anyway, were you thinking about showing Kelvin in addition to C/F, or just using it for calculating C and F temperature? --Mythril 16:03, 28 June 2006 (UTC)
Similar template for speed?
[edit]Excellent work on this template — congratulations! Could you please also create a speed-template to convert between m/s and f/s? --ZeroOne (talk | @) 19:13, 14 May 2007 (UTC)
How about a similar one with specified scale first and converted second?
[edit]I'd like a template that output the specified temperature first, with the calculated one second in parens. For example:
{{temperature|celsius=100}} would produce 100 °C (212 °F); but {{temperature|fahrenheit=212}} would produce 212 °F (100 °C).
Forcing Celsius first is fine for scientific contexts, but looks odd in, for example, Sunnyvale, California, where it renders as 29.4 °C (85 °F) and 35 °C (95 °F). -- 00:12, 20 October 2007 (UTC)
Reassignment
[edit]Considering that
- this template is about half as efficient as
{{convert}}
in terms of pre-expand size
- I've just (about 6:34 & 6:36 am GMT) tested the template at WP:SAND to see how it stands up to {{convert}} with respect to pre-expand size. The results are as follow.
- Pre-expand include size: 6320/2048000 bytes for
{{temperature|celsius=30}}
- Pre-expand include size: 3133/2048000 bytes for
{{convert|30|C|lk=on}}
- Pre-expand include size: 6320/2048000 bytes for
- I don't mean to blow my own horn or anything but (at least for 30 °C) using {{convert}} instead reduces pre-expand size by about 50%. Jɪmp 06:51, 17 January 2008 (UTC)
- I've just (about 6:34 & 6:36 am GMT) tested the template at WP:SAND to see how it stands up to {{convert}} with respect to pre-expand size. The results are as follow.
{{convert}}
has a great number of features this template lacks{{convert}}
puts the original value first and conversions afterwards (which is the norm) whereas this template always puts Celsius first (which is an option I intend to add to{{convert}}
) and- there remain no transclusions of this template
I intend to depreciate it as a conversion template and reassign it as a temperature infobox. Jɪmp 01:16, 24 January 2008 (UTC)