js-quantities icon indicating copy to clipboard operation
js-quantities copied to clipboard

"C" as Celsius recognized, but "°C" is not

Open g-liu opened this issue 10 years ago • 3 comments

It would be wonderful if the degree symbol was recognized as part of a temperature unit. Then, there would be no need to strip out the ° symbol when performing calculations or conversions.

g-liu avatar Sep 08 '15 23:09 g-liu

I agree that support for °C would be great, although it's not easy to implement as the temperature units are a very special case (discussion here #1 and here #37) ... btw, 'C' is the SI-symbol for Coulomb (that's why it was recognized, see here), you can use 'tempC' for a temperature in °C

MikiDi avatar Apr 24 '16 11:04 MikiDi

Is this really that difficult? ~~the definition: "By international agreement, since 1954 the unit "degree Celsius" and the Celsius scale are defined by absolute zero... This definition also precisely relates the Celsius scale to the Kelvin scale, which defines the SI base unit of thermodynamic temperature with symbol K... This means that a temperature difference of one degree Celsius and that of one kelvin are exactly the same."~~

edit: I see from the implementation why its problematic now.

perhaps you could have 1 °C = 274.15 K and 1 Δ°C = 1 K

OR 1 °C = 274.15 K and 1 C° = 1 K

"This is sometimes solved by using the symbol °C (pronounced "degrees Celsius") for a temperature, and C° (pronounced "Celsius degrees") for a temperature interval, although this usage is non-standard.[27]" ref: https://en.wikipedia.org/wiki/Celsius

MeirionHughes avatar May 10 '18 09:05 MeirionHughes

Also one can use the unicode ℃ ℉ as an alias

bcowgill avatar Jul 22 '20 13:07 bcowgill