Struct dmntk_feel_temporal::FeelDateTime
source · pub struct FeelDateTime(/* private fields */);
Expand description
FEEL date and time.
Implementations§
source§impl FeelDateTime
impl FeelDateTime
sourcepub fn utc(
year: Year,
month: Month,
day: Day,
hour: u8,
minute: u8,
second: u8,
nanosecond: u64
) -> Self
pub fn utc( year: Year, month: Month, day: Day, hour: u8, minute: u8, second: u8, nanosecond: u64 ) -> Self
Creates UTC date and time from specified date and time values.
sourcepub fn local(
year: Year,
month: Month,
day: Day,
hour: u8,
min: u8,
sec: u8,
nanos: u64
) -> Self
pub fn local( year: Year, month: Month, day: Day, hour: u8, min: u8, sec: u8, nanos: u64 ) -> Self
Creates local date and time from specified date and time values.
sourcepub fn offset(
date: (Year, Month, Day),
time: (u8, u8, u8, u64),
offset: i32
) -> Self
pub fn offset( date: (Year, Month, Day), time: (u8, u8, u8, u64), offset: i32 ) -> Self
Creates date and time from specified date, time and offset values.
pub fn year(&self) -> Year
pub fn month(&self) -> Month
pub fn day(&self) -> Day
pub fn day_of_week(&self) -> Option<DayOfWeek>
pub fn day_of_year(&self) -> Option<DayOfYear>
pub fn week_of_year(&self) -> Option<WeekOfYear>
pub fn month_of_year(&self) -> Option<MonthOfYear>
pub fn hour(&self) -> u8
pub fn minute(&self) -> u8
pub fn second(&self) -> u8
pub fn feel_time_offset(&self) -> Option<i32>
pub fn feel_time_zone(&self) -> Option<String>
pub fn is(&self, rhs: &FeelDateTime) -> bool
Trait Implementations§
source§impl Add<FeelDaysAndTimeDuration> for FeelDateTime
impl Add<FeelDaysAndTimeDuration> for FeelDateTime
source§fn add(self, rhs: FeelDaysAndTimeDuration) -> Self::Output
fn add(self, rhs: FeelDaysAndTimeDuration) -> Self::Output
Adds FeelDaysAndTimeDuration to FeelDateTime.
§type Output = Option<FeelDateTime>
type Output = Option<FeelDateTime>
The resulting type after applying the
+
operator.source§impl Add<FeelYearsAndMonthsDuration> for FeelDateTime
impl Add<FeelYearsAndMonthsDuration> for FeelDateTime
source§fn add(self, rhs: FeelYearsAndMonthsDuration) -> Self::Output
fn add(self, rhs: FeelYearsAndMonthsDuration) -> Self::Output
Adds FeelYearsAndMonthsDuration to FeelDateTime.
§type Output = Option<FeelDateTime>
type Output = Option<FeelDateTime>
The resulting type after applying the
+
operator.source§impl Clone for FeelDateTime
impl Clone for FeelDateTime
source§fn clone(&self) -> FeelDateTime
fn clone(&self) -> FeelDateTime
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FeelDateTime
impl Debug for FeelDateTime
source§impl Display for FeelDateTime
impl Display for FeelDateTime
Implements Display
trait for date and time.
source§impl PartialEq for FeelDateTime
impl PartialEq for FeelDateTime
source§impl PartialOrd for FeelDateTime
impl PartialOrd for FeelDateTime
source§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Returns the ordering of two date and times.
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Sub<FeelDaysAndTimeDuration> for FeelDateTime
impl Sub<FeelDaysAndTimeDuration> for FeelDateTime
source§fn sub(self, rhs: FeelDaysAndTimeDuration) -> Self::Output
fn sub(self, rhs: FeelDaysAndTimeDuration) -> Self::Output
Subtracts FeelDaysAndTimeDuration from FeelDateTime.
§type Output = Option<FeelDateTime>
type Output = Option<FeelDateTime>
The resulting type after applying the
-
operator.source§impl Sub<FeelYearsAndMonthsDuration> for FeelDateTime
impl Sub<FeelYearsAndMonthsDuration> for FeelDateTime
source§fn sub(self, rhs: FeelYearsAndMonthsDuration) -> Self::Output
fn sub(self, rhs: FeelYearsAndMonthsDuration) -> Self::Output
Subtracts FeelYearsAndMonthsDuration from FeelDateTime.
§type Output = Option<FeelDateTime>
type Output = Option<FeelDateTime>
The resulting type after applying the
-
operator.source§impl Sub for FeelDateTime
impl Sub for FeelDateTime
§type Output = Option<FeelDaysAndTimeDuration>
type Output = Option<FeelDaysAndTimeDuration>
The resulting type after applying the
-
operator.source§impl TryFrom<&str> for FeelDateTime
impl TryFrom<&str> for FeelDateTime
§type Error = DmntkError
type Error = DmntkError
The type returned in the event of a conversion error.
source§impl TryFrom<FeelDateTime> for DateTime<FixedOffset>
impl TryFrom<FeelDateTime> for DateTime<FixedOffset>
§type Error = DmntkError
type Error = DmntkError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for FeelDateTime
impl RefUnwindSafe for FeelDateTime
impl Send for FeelDateTime
impl Sync for FeelDateTime
impl Unpin for FeelDateTime
impl UnwindSafe for FeelDateTime
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more