icu_locale_core/preferences/extensions/unicode/keywords/hour_cycle.rs
1// This file is part of ICU4X. For terms of use, please see the file
2// called LICENSE at the top level of the ICU4X source tree
3// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4
5#[cfg(feature = "alloc")]
6use crate::preferences::extensions::unicode::enum_keyword;
7
8#[cfg(feature = "alloc")]
9enum_keyword!(
10 /// A Unicode Hour Cycle Identifier defines the preferred time cycle. Specifying "hc" in a locale identifier overrides the default value specified by supplemental time data for the region.
11 ///
12 /// The valid values are listed in [LDML](https://unicode.org/reports/tr35/#UnicodeHourCycleIdentifier).
13 HourCycle {
14 /// The typical 12-hour clock. Hours are numbered 1–12. Corresponds to 'h' in patterns.
15 ("h12" => H12),
16 /// The 24-hour clock. Hour are numbered 0–23. Corresponds to 'H' in patterns.
17 ("h23" => H23),
18 /// Variant of the 12-hour clock, sometimes used in Japan. Hours are numbered 0–11. Corresponds to 'K' in patterns.
19 ("h11" => H11),
20}, "hc");