[−][src]Struct holding_kronos::CalendarDateTime
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]
fn clone(&self) -> CalendarDateTime<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,