pub struct SimpleDate {
pub year: u32,
pub month: u32,
pub day: u32,
}Expand description
Simple date structure to replace chrono::NaiveDate
Fields§
§year: u32Year component (e.g., 2024)
month: u32Month component (1-12)
day: u32Day component (1-31)
Implementations§
Source§impl SimpleDate
impl SimpleDate
Sourcepub fn from_system_time(time: SystemTime) -> Self
pub fn from_system_time(time: SystemTime) -> Self
Create SimpleDate from SystemTime
Sourcepub fn format_yyyymmdd(&self) -> String
pub fn format_yyyymmdd(&self) -> String
Format date as YYYYMMDD
Sourcepub fn parse_yyyymmdd(date_str: &str) -> Option<Self>
pub fn parse_yyyymmdd(date_str: &str) -> Option<Self>
Parse date from YYYYMMDD format
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 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimpleDate
impl Debug 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 · 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§impl PartialOrd for SimpleDate
impl PartialOrd for SimpleDate
impl Copy for SimpleDate
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more