pub struct MonthInfo {
pub ordinal: u8,
pub standard_code: MonthCode,
pub formatting_code: MonthCode,
}
Expand description
Representation of a formattable month.
Fields§
§ordinal: u8
The month number in this given year. For calendars with leap months, all months after the leap month will end up with an incremented number.
In general, prefer using the month code in generic code.
standard_code: MonthCode
The month code, used to distinguish months during leap years.
This follows Temporal’s specification. Months considered the “same” have the same code: This means that the Hebrew months “Adar” and “Adar II” (“Adar, but during a leap year”) are considered the same month and have the code M05
formatting_code: MonthCode
A month code, useable for formatting
This may not necessarily be the canonical month code for a month in cases where a month has different formatting in a leap year, for example Adar/Adar II in the Hebrew calendar in a leap year has the standard code M06, but for formatting specifically the Hebrew calendar will return M06L since it is formatted differently.
Implementations§
Trait Implementations§
source§impl<C, A, Z> GetField<MonthInfo> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A, Z> GetField<MonthInfo> for CustomZonedDateTime<A, Z>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§impl<C, A> GetField<MonthInfo> for DateTime<A>where
C: Calendar,
A: AsCalendar<Calendar = C>,
impl<C, A> GetField<MonthInfo> for DateTime<A>where
C: Calendar,
A: AsCalendar<Calendar = C>,
source§impl IntoOption<MonthInfo> for MonthInfo
impl IntoOption<MonthInfo> for MonthInfo
source§fn into_option(self) -> Option<MonthInfo>
fn into_option(self) -> Option<MonthInfo>
self
as an Option<T>
impl Copy for MonthInfo
impl StructuralPartialEq for MonthInfo
Auto Trait Implementations§
impl Freeze for MonthInfo
impl RefUnwindSafe for MonthInfo
impl Send for MonthInfo
impl Sync for MonthInfo
impl Unpin for MonthInfo
impl UnwindSafe for MonthInfo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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