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§
Sourcefn previous_month(&self) -> NaiveDate
fn previous_month(&self) -> NaiveDate
returns a date with the first day of the previous month
Sourcefn next_month(&self) -> NaiveDate
fn next_month(&self) -> NaiveDate
returns a date with the first day of the next month
Sourcefn previous_year(&self) -> NaiveDate
fn previous_year(&self) -> NaiveDate
returns a date with the first day of the previous year
Sourcefn previous_year_group(&self) -> NaiveDate
fn previous_year_group(&self) -> NaiveDate
returns a date with the first day of the last year of the previous year group
Sourcefn next_year_group(&self) -> NaiveDate
fn next_year_group(&self) -> NaiveDate
returns a date with the first day of the first year of the next year group
Sourcefn first_day_of_month(&self) -> NaiveDate
fn first_day_of_month(&self) -> NaiveDate
returns a date with the first day of the currently set month
Sourcefn contains(&self, dialog_view_type: &DialogViewType, date: &NaiveDate) -> bool
fn contains(&self, dialog_view_type: &DialogViewType, date: &NaiveDate) -> bool
returns true if the currently ViewedDate with the given DialogViewType includes the given date