Trait icu_datetime::input::LocalizedDateTimeInput
source · [−]pub trait LocalizedDateTimeInput<T: DateTimeInput> {
fn datetime(&self) -> &T;
fn year_week(&self) -> Result<FormattableYear, DateTimeError>;
fn week_of_month(&self) -> Result<WeekOfMonth, DateTimeError>;
fn week_of_year(&self) -> Result<WeekOfYear, DateTimeError>;
fn day_of_week_in_month(&self) -> Result<DayOfWeekInMonth, DateTimeError>;
fn flexible_day_period(&self);
}
Expand description
A formattable calendar date and ISO time that takes the locale into account.
Required Methods
A reference to this instance’s DateTimeInput
.
fn year_week(&self) -> Result<FormattableYear, DateTimeError>
fn year_week(&self) -> Result<FormattableYear, DateTimeError>
The year number according to week numbering.
For example, December 31, 2020 is part of the first week of 2021.
fn week_of_month(&self) -> Result<WeekOfMonth, DateTimeError>
fn week_of_month(&self) -> Result<WeekOfMonth, DateTimeError>
The week of the month.
For example, January 1, 2021 is part of the first week of January.
fn week_of_year(&self) -> Result<WeekOfYear, DateTimeError>
fn week_of_year(&self) -> Result<WeekOfYear, DateTimeError>
The week number of the year.
For example, December 31, 2020 is part of the first week of 2021.
fn day_of_week_in_month(&self) -> Result<DayOfWeekInMonth, DateTimeError>
fn day_of_week_in_month(&self) -> Result<DayOfWeekInMonth, DateTimeError>
The day of week in this month.
For example, July 8, 2020 is the 2nd Wednesday of July.
fn flexible_day_period(&self)
fn flexible_day_period(&self)
TODO(#487): Implement flexible day periods.