Trait icu_datetime::date::DateInput
source · [−]pub trait DateInput {
type Calendar: CldrCalendar;
fn year(&self) -> Option<Year>;
fn month(&self) -> Option<Month>;
fn day_of_month(&self) -> Option<DayOfMonth>;
fn iso_weekday(&self) -> Option<IsoWeekday>;
fn day_of_year_info(&self) -> Option<DayOfYearInfo>;
}
Expand description
Representation of a formattable calendar date. Supports dates in any calendar system that uses solar days indexed by an era, year, month, and day.
All fields are optional. If a field is not present but is required when formatting, an error result will be returned from the formatter.
All data represented in DateInput
should be locale-agnostic.
Required Associated Types
type Calendar: CldrCalendar
type Calendar: CldrCalendar
The CLDR calendar this date relates to
Required Methods
fn day_of_month(&self) -> Option<DayOfMonth>
fn day_of_month(&self) -> Option<DayOfMonth>
Gets the day input.
fn iso_weekday(&self) -> Option<IsoWeekday>
fn iso_weekday(&self) -> Option<IsoWeekday>
Gets the weekday input.
fn day_of_year_info(&self) -> Option<DayOfYearInfo>
fn day_of_year_info(&self) -> Option<DayOfYearInfo>
Gets information on the position of the day within the year.
Implementations on Foreign Types
sourceimpl<C: CldrCalendar, A: AsCalendar<Calendar = C>> DateInput for Date<A>
impl<C: CldrCalendar, A: AsCalendar<Calendar = C>> DateInput for Date<A>
sourcefn day_of_month(&self) -> Option<DayOfMonth>
fn day_of_month(&self) -> Option<DayOfMonth>
Gets the day input.
sourcefn iso_weekday(&self) -> Option<IsoWeekday>
fn iso_weekday(&self) -> Option<IsoWeekday>
Gets the weekday input.
sourcefn day_of_year_info(&self) -> Option<DayOfYearInfo>
fn day_of_year_info(&self) -> Option<DayOfYearInfo>
Gets information on the position of the day within the year.
type Calendar = C
sourceimpl<C: CldrCalendar, A: AsCalendar<Calendar = C>> DateInput for DateTime<A>
impl<C: CldrCalendar, A: AsCalendar<Calendar = C>> DateInput for DateTime<A>
sourcefn day_of_month(&self) -> Option<DayOfMonth>
fn day_of_month(&self) -> Option<DayOfMonth>
Gets the day input.
sourcefn iso_weekday(&self) -> Option<IsoWeekday>
fn iso_weekday(&self) -> Option<IsoWeekday>
Gets the weekday input.
sourcefn day_of_year_info(&self) -> Option<DayOfYearInfo>
fn day_of_year_info(&self) -> Option<DayOfYearInfo>
Gets information on the position of the day within the year.