Struct chinese_lunisolar_calendar::LunisolarYear[][src]

pub struct LunisolarYear { /* fields omitted */ }

農曆西曆年,農曆新年所在的西曆年份。

Implementations

impl LunisolarYear[src]

pub unsafe fn from_solar_year_unsafe<Y: Into<SolarYear>>(
    solar_year: Y
) -> LunisolarYear
[src]

透過西曆年份來取得 LunisolarYear 實體。

pub fn from_solar_year<Y: Into<SolarYear>>(
    solar_year: Y
) -> Option<LunisolarYear>
[src]

透過西曆年份來取得 LunisolarYear 實體。

pub fn get_heavenly_stems(self) -> HeavenlyStems[src]

取得此西曆年中,農曆新年的中國天干。

pub fn get_earthly_branch(self) -> EarthlyBranch[src]

取得此西曆年中,農曆新年的中國地支。

pub fn get_zodiac(self) -> Zodiac[src]

取得此西曆年中,農曆新年所屬的生肖。

pub fn get_leap_lunar_month(self) -> Option<LunarMonth>[src]

取得此年的農曆閏月月份。

pub fn get_total_days_in_leap_month(self) -> u16[src]

計算此西曆年下的農曆閏月共有幾天。如果沒有閏月,則回傳0。

pub fn get_total_days(self) -> u16[src]

計算此西曆年下的農曆年共有幾天。。

pub fn get_total_days_in_a_month(self, lunar_month: LunarMonth) -> Option<u8>[src]

計算此西曆年下的農曆年的某個月共有幾天。。

pub fn to_lunar_year(self) -> LunarYear[src]

取得 LunarYear 實體。

pub fn to_solar_year(self) -> SolarYear[src]

取得 SolarYear 實體。

pub fn to_u16(self) -> u16[src]

取得 LunisolarYear 實體所代表的西曆年份數值。

Trait Implementations

impl Clone for LunisolarYear[src]

impl Copy for LunisolarYear[src]

impl Debug for LunisolarYear[src]

impl Display for LunisolarYear[src]

impl Eq for LunisolarYear[src]

impl Hash for LunisolarYear[src]

impl Ord for LunisolarYear[src]

impl PartialEq<LunisolarYear> for LunisolarYear[src]

impl PartialOrd<LunisolarYear> for LunisolarYear[src]

impl StructuralEq for LunisolarYear[src]

impl StructuralPartialEq for LunisolarYear[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.