pub struct Date(_);Implementations
sourceimpl Date
impl Date
pub fn new() -> Date
pub fn new_dmy(day: DateDay, month: DateMonth, year: DateYear) -> Date
pub fn new_julian(julian_day: u32) -> Date
pub fn add_days(&mut self, n_days: u32)
pub fn add_months(&mut self, n_months: u32)
pub fn add_years(&mut self, n_years: u32)
pub fn clamp(&mut self, min_date: &Date, max_date: &Date)
pub fn clear(&mut self, n_dates: u32)
pub fn days_between(&self, date2: &Date) -> i32
pub fn get_day(&self) -> DateDay
pub fn get_day_of_year(&self) -> u32
pub fn get_iso8601_week_of_year(&self) -> u32
pub fn get_julian(&self) -> u32
pub fn get_monday_week_of_year(&self) -> u32
pub fn get_month(&self) -> DateMonth
pub fn get_sunday_week_of_year(&self) -> u32
pub fn get_weekday(&self) -> DateWeekday
pub fn get_year(&self) -> DateYear
pub fn is_first_of_month(&self) -> bool
pub fn is_last_of_month(&self) -> bool
pub fn order(&mut self, date2: &mut Date)
pub fn set_day(&mut self, day: DateDay)
pub fn set_dmy(&mut self, day: DateDay, month: DateMonth, y: DateYear)
pub fn set_julian(&mut self, julian_date: u32)
pub fn set_month(&mut self, month: DateMonth)
pub fn set_parse(&mut self, str: &str)
pub fn set_time(&mut self, time_: Time)
pub fn set_time_t(&mut self, timet: c_long)
pub fn set_year(&mut self, year: DateYear)
pub fn subtract_days(&mut self, n_days: u32)
pub fn subtract_months(&mut self, n_months: u32)
pub fn subtract_years(&mut self, n_years: u32)
pub fn valid(&self) -> bool
pub fn get_days_in_month(month: DateMonth, year: DateYear) -> u8
pub fn get_monday_weeks_in_year(year: DateYear) -> u8
pub fn get_sunday_weeks_in_year(year: DateYear) -> u8
pub fn is_leap_year(year: DateYear) -> bool
pub fn strftime(s: &str, format: &str, date: &Date) -> usize
pub fn valid_day(day: DateDay) -> bool
pub fn valid_dmy(day: DateDay, month: DateMonth, year: DateYear) -> bool
pub fn valid_julian(julian_date: u32) -> bool
pub fn valid_month(month: DateMonth) -> bool
pub fn valid_weekday(weekday: DateWeekday) -> bool
pub fn valid_year(year: DateYear) -> bool
Trait Implementations
sourceimpl Ord for Date
impl Ord for Date
1.21.0 · sourcefn 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 · sourcefn 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
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Date> for Date
impl PartialOrd<Date> for Date
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl StaticType for Date
impl StaticType for Date
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self.impl Eq for Date
impl Send for Date
impl Sync for Date
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToSendValue for Twhere
T: SetValue + Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere
T: SetValue + Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue clone of self.