class Kelvin::Locale
- Kelvin::Locale
- Reference
- Object
Overview
The Locale defines if temperatures should be displayed in °C or °F.
Defined in:
kelvin/locale.crConstant Summary
-
FAHRENHEIT_LOCALES =
["_US", "_BZ"]
Class Method Summary
-
.celcius?
Returns true if the current locale suggests that degrees Celcius should be used.
-
.fahrenheit?
Returns true if the current locale suggests that degrees Fahrenheit should be used.
-
.locale
returns the locale that we use to determine the preferred temperature scale.
Class Method Detail
Returns true if the current locale suggests that degrees Celcius should be used.
The opposite #fahrenheit?
Returns true if the current locale suggests that degrees Fahrenheit should be used.
Only a few countries use Fahrenheit as their official scale: the United States, Belize, Palau, and the British Territories of the Bahamas and the Cayman Islands. Note that even though Liberia and Myanmar use imperial measurements they use °C for temperature.
For some purposes (cooking) °F is still widely used in Canada and other places. This method cannot know your purpose so it will ignore that.