pub struct LunisolarYear { /* private fields */ }
Expand description
農曆西曆年,農曆新年所在的西曆年份。
Implementations§
source§impl LunisolarYear
impl LunisolarYear
sourcepub unsafe fn from_solar_year_unsafe<Y: Into<SolarYear>>(
solar_year: Y
) -> LunisolarYear
pub unsafe fn from_solar_year_unsafe<Y: Into<SolarYear>>(
solar_year: Y
) -> LunisolarYear
透過西曆年份來取得 LunisolarYear
實體。
sourcepub fn from_solar_year<Y: Into<SolarYear>>(
solar_year: Y
) -> Option<LunisolarYear>
pub fn from_solar_year<Y: Into<SolarYear>>(
solar_year: Y
) -> Option<LunisolarYear>
透過西曆年份來取得 LunisolarYear
實體。
sourcepub fn get_heavenly_stems(&self) -> HeavenlyStems
pub fn get_heavenly_stems(&self) -> HeavenlyStems
取得此西曆年中,農曆新年的中國天干。
sourcepub fn get_earthly_branch(&self) -> EarthlyBranch
pub fn get_earthly_branch(&self) -> EarthlyBranch
取得此西曆年中,農曆新年的中國地支。
sourcepub fn get_zodiac(&self) -> Zodiac
pub fn get_zodiac(&self) -> Zodiac
取得此西曆年中,農曆新年所屬的生肖。
sourcepub fn get_leap_lunar_month(&self) -> Option<LunarMonth>
pub fn get_leap_lunar_month(&self) -> Option<LunarMonth>
取得此年的農曆閏月月份。
sourcepub fn get_total_days_in_leap_month(&self) -> u16
pub fn get_total_days_in_leap_month(&self) -> u16
計算此西曆年下的農曆閏月共有幾天。如果沒有閏月,則回傳0。
sourcepub fn get_total_days(&self) -> u16
pub fn get_total_days(&self) -> u16
計算此西曆年下的農曆年共有幾天。。
sourcepub fn get_total_days_in_a_month(&self, lunar_month: LunarMonth) -> Option<u8>
pub fn get_total_days_in_a_month(&self, lunar_month: LunarMonth) -> Option<u8>
計算此西曆年下的農曆年的某個月共有幾天。。
sourcepub fn to_lunar_year(&self) -> LunarYear
pub fn to_lunar_year(&self) -> LunarYear
取得 LunarYear
實體。
sourcepub fn to_solar_year(&self) -> SolarYear
pub fn to_solar_year(&self) -> SolarYear
取得 SolarYear
實體。
Trait Implementations§
source§impl Clone for LunisolarYear
impl Clone for LunisolarYear
source§fn clone(&self) -> LunisolarYear
fn clone(&self) -> LunisolarYear
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 LunisolarYear
impl Debug for LunisolarYear
source§impl Display for LunisolarYear
impl Display for LunisolarYear
source§impl Hash for LunisolarYear
impl Hash for LunisolarYear
source§impl Ord for LunisolarYear
impl Ord for LunisolarYear
source§fn cmp(&self, other: &LunisolarYear) -> Ordering
fn cmp(&self, other: &LunisolarYear) -> 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<LunisolarYear> for LunisolarYear
impl PartialEq<LunisolarYear> for LunisolarYear
source§fn eq(&self, other: &LunisolarYear) -> bool
fn eq(&self, other: &LunisolarYear) -> bool
source§impl PartialOrd<LunisolarYear> for LunisolarYear
impl PartialOrd<LunisolarYear> for LunisolarYear
source§fn partial_cmp(&self, other: &LunisolarYear) -> Option<Ordering>
fn partial_cmp(&self, other: &LunisolarYear) -> 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