Enum icu_datetime::fields::symbols::Hour
source · #[repr(u8)]pub enum Hour {
H11 = 0,
H12 = 1,
H23 = 2,
H24 = 3,
}
Expand description
An enum for the possible symbols of an hour field in a date pattern.
Variants§
H11 = 0
Field symbol for numeric hour [0-11].
This field symbol is represented by the character K
in a date formatting pattern string.
For more details, see documentation on date field symbols.
H12 = 1
Field symbol for numeric hour [1-12].
This field symbol is represented by the character h
in a date formatting pattern string.
For more details, see documentation on date field symbols.
H23 = 2
Field symbol for numeric hour [0-23].
This field symbol is represented by the character H
in a date formatting pattern string.
For more details, see documentation on date field symbols.
H24 = 3
Field symbol for numeric hour [1-24].
This field symbol is represented by the character k
in a date formatting pattern string.
For more details, see documentation on date field symbols.
Implementations§
source§impl Hour
impl Hour
sourcepub(crate) fn new_from_u8(value: u8) -> Option<Self>
pub(crate) fn new_from_u8(value: u8) -> Option<Self>
Attempt to construct the value from its corresponding integer,
returning None
if not possible
Trait Implementations§
source§impl From<Hour> for FieldSymbol
impl From<Hour> for FieldSymbol
source§impl Ord for Hour
impl Ord for Hour
source§impl PartialEq for Hour
impl PartialEq for Hour
source§impl PartialOrd for Hour
impl PartialOrd for Hour
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<'a> Yokeable<'a> for Hourwhere
Self: Sized,
impl<'a> Yokeable<'a> for Hourwhere
Self: Sized,
source§impl<'a> ZeroMapKV<'a> for Hour
impl<'a> ZeroMapKV<'a> for Hour
impl Copy for Hour
impl Eq for Hour
impl StructuralPartialEq for Hour
Auto Trait Implementations§
impl Freeze for Hour
impl RefUnwindSafe for Hour
impl Send for Hour
impl Sync for Hour
impl Unpin for Hour
impl UnwindSafe for Hour
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more