• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")]
6 use crate::preferences::extensions::unicode::enum_keyword;
7 
8 #[cfg(feature = "alloc")]
9 enum_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         /// Variant of the 24-hour clock, not in common use. Hours are numbered 1–24. Corresponds to 'k' in patterns.
21         ///
22         /// ❗ This is not the typical 24-hour clock! See `H23` above for the 24-hour clock used throughout most of the world.
23         ("h24" => H24),
24 }, "hc");
25