Struct calendrical_calculations::rata_die::RataDie
source · pub struct RataDie(/* private fields */);
Expand description
The Rata Die, or R.D., or fixed_date
: number of days since January 1, 1 CE.
See: https://en.wikipedia.org/wiki/Rata_Die
It is a logic error to construct a RataDie except from a date that is in range of one of the official calendars.
Implementations§
source§impl RataDie
impl RataDie
sourcepub const fn to_i64_date(self) -> i64
pub const fn to_i64_date(self) -> i64
Convert this to an i64 value representing the RataDie
sourcepub const fn to_f64_date(self) -> f64
pub const fn to_f64_date(self) -> f64
Convert this to an f64 value representing the RataDie
sourcepub const fn const_diff(self, rhs: Self) -> i64
pub const fn const_diff(self, rhs: Self) -> i64
Calculate the number of days between two RataDie in a const-friendly way
Trait Implementations§
source§impl AddAssign<i64> for RataDie
impl AddAssign<i64> for RataDie
source§fn add_assign(&mut self, rhs: i64)
fn add_assign(&mut self, rhs: i64)
Performs the
+=
operation. Read moresource§impl Ord for RataDie
impl Ord for RataDie
source§impl PartialOrd for RataDie
impl PartialOrd for RataDie
source§impl SubAssign<i64> for RataDie
impl SubAssign<i64> for RataDie
source§fn sub_assign(&mut self, rhs: i64)
fn sub_assign(&mut self, rhs: i64)
Performs the
-=
operation. Read moreimpl Copy for RataDie
impl Eq for RataDie
impl StructuralPartialEq for RataDie
Auto Trait Implementations§
impl Freeze for RataDie
impl RefUnwindSafe for RataDie
impl Send for RataDie
impl Sync for RataDie
impl Unpin for RataDie
impl UnwindSafe for RataDie
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)