pub struct Date {
pub year: u64,
pub month: u64,
pub day: u64,
}Fields§
§year: u64§month: u64§day: u64Implementations§
Source§impl Date
impl Date
pub fn new(year: u64, month: u64, day: u64) -> Self
pub fn leap_year(&self) -> bool
pub fn recent_leap_year(&self) -> u64
pub fn next_leap_year(&self) -> u64
pub fn year_day(&self) -> u64
pub fn days_to_next_year(&self) -> u64
pub fn month_index(&self) -> usize
pub fn valid(&self) -> bool
pub fn from_ms_dos_date(ms_dos_date: u16) -> Self
pub fn add_days(&self, days: u64) -> Self
pub fn from_seconds_since_unix_epoch(seconds: u64) -> (Self, u64)
pub fn to_seconds_from_unix_epoch(self, included: bool) -> u64
pub fn today() -> Self
pub fn quarter(&self) -> usize
pub fn add_months(&self, months: i64) -> Self
pub fn sub_months(&self, months: i64) -> Self
pub fn is_month_last_day(&self) -> bool
pub fn month_last_day(&self) -> Self
pub fn sub_days(&self, days: u64) -> Self
pub fn to_days(&self) -> u64
pub fn from_days(days: u64) -> Self
pub fn is_monday(&self) -> bool
pub fn is_tuesday(&self) -> bool
pub fn is_wednesday(&self) -> bool
pub fn is_thursday(&self) -> bool
pub fn is_friday(&self) -> bool
pub fn is_saturday(&self) -> bool
pub fn is_sunday(&self) -> bool
pub fn is_weekend(&self) -> bool
pub fn is_week_day(&self) -> bool
pub fn normalize(&self) -> Date
Trait Implementations§
Source§impl Ord for Date
impl Ord for Date
Source§impl PartialOrd for Date
impl PartialOrd for Date
impl Copy for Date
impl Eq 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 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