Trait now::DateTimeNow
source · [−]pub trait DateTimeNow {
type Timezone: TimeZone;
Show 17 methods
fn beginning_of_minute(&self) -> DateTime<Self::Timezone>;
fn beginning_of_hour(&self) -> DateTime<Self::Timezone>;
fn beginning_of_day(&self) -> DateTime<Self::Timezone>;
fn beginning_of_week(&self) -> DateTime<Self::Timezone>;
fn beginning_of_week_with_start_day(
&self,
week_start_day: &WeekStartDay
) -> DateTime<Self::Timezone>;
fn beginning_of_month(&self) -> DateTime<Self::Timezone>;
fn beginning_of_quarter(&self) -> DateTime<Self::Timezone>;
fn beginning_of_year(&self) -> DateTime<Self::Timezone>;
fn end_of_minute(&self) -> DateTime<Self::Timezone>;
fn end_of_hour(&self) -> DateTime<Self::Timezone>;
fn end_of_day(&self) -> DateTime<Self::Timezone>;
fn end_of_week(&self) -> DateTime<Self::Timezone>;
fn end_of_week_with_start_day(
&self,
week_start_day: &WeekStartDay
) -> DateTime<Self::Timezone>;
fn end_of_month(&self) -> DateTime<Self::Timezone>;
fn end_of_quarter(&self) -> DateTime<Self::Timezone>;
fn end_of_year(&self) -> DateTime<Self::Timezone>;
fn week_of_year(&self) -> u32;
}
Required Associated Types
Required Methods
source
fn beginning_of_minute(&self) -> DateTime<Self::Timezone>
source
fn beginning_of_hour(&self) -> DateTime<Self::Timezone>
source
fn beginning_of_day(&self) -> DateTime<Self::Timezone>
sourcefn beginning_of_week(&self) -> DateTime<Self::Timezone>
fn beginning_of_week(&self) -> DateTime<Self::Timezone>
get beginning of week. the default week start day is Monday.
sourcefn beginning_of_week_with_start_day(
&self,
week_start_day: &WeekStartDay
) -> DateTime<Self::Timezone>
fn beginning_of_week_with_start_day(
&self,
week_start_day: &WeekStartDay
) -> DateTime<Self::Timezone>
get beginning of week given specific week start day.
source
fn beginning_of_month(&self) -> DateTime<Self::Timezone>
source
fn beginning_of_quarter(&self) -> DateTime<Self::Timezone>
source
fn beginning_of_year(&self) -> DateTime<Self::Timezone>
source
fn end_of_minute(&self) -> DateTime<Self::Timezone>
source
fn end_of_hour(&self) -> DateTime<Self::Timezone>
source
fn end_of_day(&self) -> DateTime<Self::Timezone>
source
fn end_of_week(&self) -> DateTime<Self::Timezone>
sourcefn end_of_week_with_start_day(
fn end_of_week_with_start_day(
&self,
week_start_day: &WeekStartDay
) -> DateTime<Self::Timezone>
source
fn end_of_month(&self) -> DateTime<Self::Timezone>
source
fn end_of_quarter(&self) -> DateTime<Self::Timezone>
source
fn end_of_year(&self) -> DateTime<Self::Timezone>
source