[][src]Struct holding_kronos::CalendarDateTime

pub struct CalendarDateTime<'a> { /* fields omitted */ }

Allows you to do calendar-aware manipulation of the DateTime.

Implementations

impl<'_> CalendarDateTime<'_>[src]

pub fn era(&self) -> Option<&Era>[src]

Get the current era.

pub fn year(&self) -> i64[src]

Get the current year.

pub fn day(&self) -> u32[src]

Get the current day.

pub fn hour(&self) -> u32[src]

Get the current hour.

pub fn minute(&self) -> u32[src]

Get the current minute.

pub fn second(&self) -> u32[src]

Get the current second.

pub fn modulo(&self, other: u32) -> u32[src]

Get the number of seconds this date represents modulo another.

pub fn week_day(&self) -> usize[src]

Get the ordinal of the current week day.

pub fn week_day_name(&self) -> &str[src]

Get the name of the current week day.

pub fn month_day(&self) -> u32[src]

Get the ordinal of the day of the month.

pub fn month(&self) -> u32[src]

Get the ordinal of the current month.

pub fn month_name(&self) -> &str[src]

Get the name of the current month.

pub fn wait_until(self, target: WaitTarget) -> Result<DateTime, WaitError>[src]

Progress time forward to a given target.

pub fn add_years(self, years: u32) -> DateTime[src]

Get a new DateTime object with years applied.

pub fn add_months(self, months: u32) -> DateTime[src]

Get a new DateTime object with months applied.

pub fn add_weeks(self, weeks: u32) -> DateTime[src]

Get a new DateTime object with weeks applied.

pub fn add_days(self, days: u32) -> DateTime[src]

Get a new DateTime object with days applied.

pub fn add_hours(self, hours: u32) -> DateTime[src]

Get a new DateTime object with hours applied.

pub fn add_minutes(self, minutes: u32) -> DateTime[src]

Get a new DateTime object with minutes applied.

pub fn add_seconds(self, seconds: u32) -> DateTime[src]

Get a new DateTime object with seconds applied.

pub fn time_of_day(self) -> TimeOfDay[src]

Get the TimeOfDay

Trait Implementations

impl<'a> Clone for CalendarDateTime<'a>[src]

impl<'a> Copy for CalendarDateTime<'a>[src]

impl<'_> Display for CalendarDateTime<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for CalendarDateTime<'a>

impl<'a> Send for CalendarDateTime<'a>

impl<'a> Sync for CalendarDateTime<'a>

impl<'a> Unpin for CalendarDateTime<'a>

impl<'a> UnwindSafe for CalendarDateTime<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.