pub enum HourCycle {
H24,
H23,
H12,
H11,
}
Expand description
A user preference for adjusting how the hour component is displayed.
🚧 This code is experimental; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. It can be enabled with the "experimental" Cargo feature
of the icu meta-crate. Use with caution.
#1317
Variants§
H24
Hour is formatted to be in range 1-24 where midnight is 24:00.
Examples
"24:12";
"8:23";
"19:00";
"23:21";
H23
Hour is formatted to be in range 0-23 where midnight is 00:00.
Examples
"0:12";
"8:23";
"19:00";
"23:21";
H12
Hour is formatted to be in range 1-12 where midnight is 12:00.
Examples
"1:12";
"8:23";
"7:00";
"11:21";
H11
Hour is formatted to be in range 0-11 where midnight is 00:00.
Examples
"0:12";
"8:23";
"7:00";
"11:21";
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for HourCycle
impl<'de> Deserialize<'de> for HourCycle
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<HourCycle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<HourCycle, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<HourCycle> for HourCycle
impl PartialEq<HourCycle> for HourCycle
source§impl Serialize for HourCycle
impl Serialize for HourCycle
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more