Struct chinese_lunisolar_calendar::LunisolarYear
source · [−]pub struct LunisolarYear { /* private fields */ }
Expand description
農曆西曆年,農曆新年所在的西曆年份。
Implementations
sourceimpl 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
sourceimpl Clone for LunisolarYear
impl Clone for LunisolarYear
sourcefn clone(&self) -> LunisolarYear
fn clone(&self) -> LunisolarYear
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LunisolarYear
impl Debug for LunisolarYear
sourceimpl Display for LunisolarYear
impl Display for LunisolarYear
sourceimpl Hash for LunisolarYear
impl Hash for LunisolarYear
sourceimpl Ord for LunisolarYear
impl Ord for LunisolarYear
sourceimpl PartialEq<LunisolarYear> for LunisolarYear
impl PartialEq<LunisolarYear> for LunisolarYear
sourcefn eq(&self, other: &LunisolarYear) -> bool
fn eq(&self, other: &LunisolarYear) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LunisolarYear) -> bool
fn ne(&self, other: &LunisolarYear) -> bool
This method tests for !=
.
sourceimpl PartialOrd<LunisolarYear> for LunisolarYear
impl PartialOrd<LunisolarYear> for LunisolarYear
sourcefn partial_cmp(&self, other: &LunisolarYear) -> Option<Ordering>
fn partial_cmp(&self, other: &LunisolarYear) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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
impl Copy for LunisolarYear
impl Eq for LunisolarYear
impl StructuralEq for LunisolarYear
impl StructuralPartialEq for LunisolarYear
Auto Trait Implementations
impl RefUnwindSafe for LunisolarYear
impl Send for LunisolarYear
impl Sync for LunisolarYear
impl Unpin for LunisolarYear
impl UnwindSafe for LunisolarYear
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more