pub struct SimpleDate {
pub year: i32,
pub month: u32,
pub day: u32,
}Fields§
§year: i32§month: u32§day: u32Implementations§
Source§impl SimpleDate
impl SimpleDate
pub fn parse(input: &str) -> Option<Self>
pub fn days_until(self, other: Self) -> i64
pub fn add_days(self, days: i64) -> Self
pub fn today_utc_approx() -> Self
pub fn is_before_date_str(date: Option<&str>, today: Self) -> bool
pub fn is_due_date_str(date: Option<&str>, today: Self) -> bool
Trait Implementations§
Source§impl Clone for SimpleDate
impl Clone for SimpleDate
Source§fn clone(&self) -> SimpleDate
fn clone(&self) -> SimpleDate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SimpleDate
Source§impl Debug for SimpleDate
impl Debug for SimpleDate
Source§impl Display for SimpleDate
impl Display for SimpleDate
impl Eq for SimpleDate
Source§impl Ord for SimpleDate
impl Ord for SimpleDate
Source§fn cmp(&self, other: &SimpleDate) -> Ordering
fn cmp(&self, other: &SimpleDate) -> Ordering
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
Source§impl PartialEq for SimpleDate
impl PartialEq for SimpleDate
Source§fn eq(&self, other: &SimpleDate) -> bool
fn eq(&self, other: &SimpleDate) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SimpleDate
impl PartialOrd for SimpleDate
impl StructuralPartialEq for SimpleDate
Auto Trait Implementations§
impl Freeze for SimpleDate
impl RefUnwindSafe for SimpleDate
impl Send for SimpleDate
impl Sync for SimpleDate
impl Unpin for SimpleDate
impl UnsafeUnpin for SimpleDate
impl UnwindSafe for SimpleDate
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