The risk band a UV index falls in, with a long and a short name for each. More...
Go to the source code of this file.
Enumerations | |
| enum | UvBand { UV_BAND_NONE , UV_BAND_LOW , UV_BAND_MODERATE , UV_BAND_HIGH , UV_BAND_VERY_HIGH , UV_BAND_EXTREME } |
| The risk bands, lowest first. More... | |
Functions | |
| UvBand | uv_band (int uv) |
| The band a UV index falls in. | |
| const char * | uv_band_name (UvBand band) |
| The band's full name in capitals, such as "MODERATE" or "VERY HIGH". | |
| const char * | uv_band_short_name (UvBand band) |
| The band's short name in capitals, at most six letters, such as "MOD" or "V.HIGH". | |
The risk band a UV index falls in, with a long and a short name for each.
A bare UV number means little to most wearers, so a face shows the band beside it. The bands are the WHO ones: 0 to 2 low, 3 to 5 moderate, 6 and 7 high, 8 to 10 very high, and 11 or more extreme. Every face that asks gets the same band for the same number, so a 7 reads HIGH wherever it shows.
Pure arithmetic on a number, so there is no watch behind it. Reading the store is the caller's job. A negative index is the weather store's "no reading", and it gets a band of its own with empty names, so nothing prints beside the dashes.