pub struct YearBounds {
pub new_year: RataDie,
pub next_new_year: RataDie,
}
Expand description
Marks the bounds of a lunar year
Fields§
§new_year: RataDie
The date marking the start of the current lunar year
next_new_year: RataDie
The date marking the start of the next lunar year
Implementations§
source§impl YearBounds
impl YearBounds
sourcepub fn compute<C: ChineseBased>(date: RataDie) -> Self
pub fn compute<C: ChineseBased>(date: RataDie) -> Self
Compute the YearBounds for the lunar year (年) containing date
,
as well as the corresponding solar year (歲). Note that since the two
years overlap significantly but not entirely, the solstice bounds for the solar
year may not include date
.
sourcepub fn count_days(self) -> u16
pub fn count_days(self) -> u16
The number of days in this year
Trait Implementations§
source§impl Clone for YearBounds
impl Clone for YearBounds
source§fn clone(&self) -> YearBounds
fn clone(&self) -> YearBounds
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 YearBounds
impl Debug for YearBounds
impl Copy for YearBounds
Auto Trait Implementations§
impl Freeze for YearBounds
impl RefUnwindSafe for YearBounds
impl Send for YearBounds
impl Sync for YearBounds
impl Unpin for YearBounds
impl UnwindSafe for YearBounds
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
Mutably borrows from an owned value. Read more