pub struct Date(/* private fields */);Expand description
A calendar date represented as signed days since the Unix epoch.
Implementations§
Source§impl Date
impl Date
Sourcepub const fn new(days_since_unix_epoch: i32) -> Self
pub const fn new(days_since_unix_epoch: i32) -> Self
Creates a date from its canonical day count.
Sourcepub const fn from_days_since_unix_epoch(days: i32) -> Self
pub const fn from_days_since_unix_epoch(days: i32) -> Self
Creates a date from its canonical day count.
Sourcepub const fn days_since_unix_epoch(self) -> i32
pub const fn days_since_unix_epoch(self) -> i32
Returns signed days since the Unix epoch.
Trait Implementations§
impl Copy for Date
impl Eq for Date
Source§impl Ord for Date
impl Ord for Date
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Date
impl PartialOrd for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnsafeUnpin for Date
impl UnwindSafe for Date
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