[go: up one dir, main page]

Struct glib::date::Date

source ·
pub struct Date { /* private fields */ }

Implementations§

source§

impl Date

source

pub fn new() -> Option<Date>

source

pub fn new_dmy(day: Day, month: Month, year: Year) -> Option<Date>

source

pub fn new_julian(julian_day: u32) -> Option<Date>

source

pub fn clear(&mut self)

source

pub fn set_day(&mut self, day: Day)

source

pub fn set_month(&mut self, month: Month)

source

pub fn set_year(&mut self, year: Year)

source

pub fn set_dmy(&mut self, day: Day, month: Month, year: Year)

source

pub fn set_julian(&mut self, julian: u32)

source

pub fn set_time_t(&mut self, timet: i64)

source

pub fn set_time_val(&mut self, timeval: &mut TimeVal)

source

pub fn set_parse(&mut self, str_: &str)

source

pub fn add_days(&mut self, days: u32)

source

pub fn subtract_days(&mut self, days: u32)

source

pub fn add_months(&mut self, months: u32)

source

pub fn subtract_months(&mut self, months: u32)

source

pub fn add_years(&mut self, years: u32)

source

pub fn subtract_years(&mut self, years: u32)

source

pub fn days_between(&self, other: &Date) -> isize

source

pub fn compare(&self, other: &Date) -> isize

source

pub fn clamp(&mut self, min_date: &Date, max_date: &Date)

source

pub fn order(&mut self, other: &mut Date)

source

pub fn get_day(&self) -> Day

source

pub fn get_month(&self) -> Month

source

pub fn get_year(&self) -> Year

source

pub fn get_julian(&self) -> u32

source

pub fn get_weekday(&self) -> Weekday

source

pub fn get_day_of_year(&self) -> u32

source

pub fn is_first_of_month(&self) -> bool

source

pub fn is_last_of_month(&self) -> bool

source

pub fn get_monday_week_of_year(&self) -> u32

source

pub fn get_sunday_week_of_year(&self) -> u32

source

pub fn get_iso8601_week_of_year(&self) -> u32

source

pub fn is_valid(&self) -> bool

Trait Implementations§

source§

impl Drop for Date

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.