pub enum SolarMonth {
January,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December,
}
Expand description
列舉西曆十二個月份名稱:一月、二月、三月、四月、五月、六月、七月、八月、九月、十月、十一月、十二月。
Variants§
January
一月
February
二月
March
三月
April
四月
May
五月
June
六月
July
七月
August
八月
September
九月
October
十月
November
十一月
December
十二月
Implementations§
source§impl SolarMonth
impl SolarMonth
pub unsafe fn from_ordinal_unsafe(number: i8) -> SolarMonth
sourcepub unsafe fn from_u8_unsafe(month: u8) -> SolarMonth
pub unsafe fn from_u8_unsafe(month: u8) -> SolarMonth
透過西曆月份數值來取得 SolarMonth
列舉實體。
sourcepub fn from_u8(month: u8) -> Option<SolarMonth>
pub fn from_u8(month: u8) -> Option<SolarMonth>
透過西曆月份數值來取得 SolarMonth
列舉實體。
sourcepub fn get_total_days<Y: Into<SolarYear>>(&self, solar_year: Y) -> u8
pub fn get_total_days<Y: Into<SolarYear>>(&self, solar_year: Y) -> u8
傳入指定的西曆年,並計算此西曆月在這個指定的西曆年內共有幾天。
Trait Implementations§
source§impl Clone for SolarMonth
impl Clone for SolarMonth
source§fn clone(&self) -> SolarMonth
fn clone(&self) -> SolarMonth
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SolarMonth
impl Debug for SolarMonth
source§impl Display for SolarMonth
impl Display for SolarMonth
source§impl Hash for SolarMonth
impl Hash for SolarMonth
source§impl Ord for SolarMonth
impl Ord for SolarMonth
source§fn cmp(&self, other: &SolarMonth) -> Ordering
fn cmp(&self, other: &SolarMonth) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<SolarMonth> for SolarMonth
impl PartialEq<SolarMonth> for SolarMonth
source§fn eq(&self, other: &SolarMonth) -> bool
fn eq(&self, other: &SolarMonth) -> bool
source§impl PartialOrd<SolarMonth> for SolarMonth
impl PartialOrd<SolarMonth> for SolarMonth
source§fn partial_cmp(&self, other: &SolarMonth) -> Option<Ordering>
fn partial_cmp(&self, other: &SolarMonth) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more