ViewedDate

Trait ViewedDate 

Source
pub trait ViewedDate {
    // Required methods
    fn previous_month(&self) -> NaiveDate;
    fn next_month(&self) -> NaiveDate;
    fn previous_year(&self) -> NaiveDate;
    fn next_year(&self) -> NaiveDate;
    fn previous_year_group(&self) -> NaiveDate;
    fn next_year_group(&self) -> NaiveDate;
    fn first_day_of_month(&self) -> NaiveDate;
    fn contains(
        &self,
        dialog_view_type: &DialogViewType,
        date: &NaiveDate,
    ) -> bool;
}
Expand description

Trait used for the variable that describes the currently viewed datepicker.

Required Methods§

Source

fn previous_month(&self) -> NaiveDate

returns a date with the first day of the previous month

Source

fn next_month(&self) -> NaiveDate

returns a date with the first day of the next month

Source

fn previous_year(&self) -> NaiveDate

returns a date with the first day of the previous year

Source

fn next_year(&self) -> NaiveDate

returns a date with the first day of the next year

Source

fn previous_year_group(&self) -> NaiveDate

returns a date with the first day of the last year of the previous year group

Source

fn next_year_group(&self) -> NaiveDate

returns a date with the first day of the first year of the next year group

Source

fn first_day_of_month(&self) -> NaiveDate

returns a date with the first day of the currently set month

Source

fn contains(&self, dialog_view_type: &DialogViewType, date: &NaiveDate) -> bool

returns true if the currently ViewedDate with the given DialogViewType includes the given date

Implementations on Foreign Types§

Source§

impl ViewedDate for NaiveDate

Implementors§