Struct calendrical_calculations::rata_die::RataDie
source · pub struct RataDie(i64);
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.
Tuple Fields§
§0: i64
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 PartialEq for RataDie
impl PartialEq for RataDie
source§impl PartialOrd for RataDie
impl PartialOrd for RataDie
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 moresource§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