pub struct Date { /* private fields */ }
Expand description
It encodes the value using a number of seconds from the Gregorian calendar era using a Decimal
,
when combined with the time 00:00:00, and an optional timezone offset in minutes.
Implementations§
Source§impl Date
impl Date
pub const MAX: Self
pub const MIN: Self
pub fn from_be_bytes(bytes: [u8; 18]) -> Self
Sourcepub fn timezone(self) -> Option<DayTimeDuration>
pub fn timezone(self) -> Option<DayTimeDuration>
pub fn timezone_offset(self) -> Option<TimezoneOffset>
pub fn to_be_bytes(self) -> [u8; 18]
Sourcepub fn checked_sub(self, rhs: impl Into<Self>) -> Option<DayTimeDuration>
pub fn checked_sub(self, rhs: impl Into<Self>) -> Option<DayTimeDuration>
Returns None
in case of overflow (FODT0001
).
Sourcepub fn checked_add_year_month_duration(
self,
rhs: impl Into<YearMonthDuration>,
) -> Option<Self>
pub fn checked_add_year_month_duration( self, rhs: impl Into<YearMonthDuration>, ) -> Option<Self>
op:add-yearMonthDuration-to-date
Returns None
in case of overflow (FODT0001
).
Sourcepub fn checked_add_day_time_duration(
self,
rhs: impl Into<DayTimeDuration>,
) -> Option<Self>
pub fn checked_add_day_time_duration( self, rhs: impl Into<DayTimeDuration>, ) -> Option<Self>
op:add-dayTimeDuration-to-dateTime
Returns None
in case of overflow (FODT0001
).
Sourcepub fn checked_add_duration(self, rhs: impl Into<Duration>) -> Option<Self>
pub fn checked_add_duration(self, rhs: impl Into<Duration>) -> Option<Self>
op:add-yearMonthDuration-to-date and op:add-dayTimeDuration-to-dateTime
Returns None
in case of overflow (FODT0001
).
Sourcepub fn checked_sub_year_month_duration(
self,
rhs: impl Into<YearMonthDuration>,
) -> Option<Self>
pub fn checked_sub_year_month_duration( self, rhs: impl Into<YearMonthDuration>, ) -> Option<Self>
op:subtract-yearMonthDuration-from-date
Returns None
in case of overflow (FODT0001
).
Sourcepub fn checked_sub_day_time_duration(
self,
rhs: impl Into<DayTimeDuration>,
) -> Option<Self>
pub fn checked_sub_day_time_duration( self, rhs: impl Into<DayTimeDuration>, ) -> Option<Self>
op:subtract-dayTimeDuration-from-date
Returns None
in case of overflow (FODT0001
).
Sourcepub fn checked_sub_duration(self, rhs: impl Into<Duration>) -> Option<Self>
pub fn checked_sub_duration(self, rhs: impl Into<Duration>) -> Option<Self>
pub fn adjust(self, timezone_offset: Option<TimezoneOffset>) -> Option<Self>
Sourcepub fn is_identical_with(self, other: Self) -> bool
pub fn is_identical_with(self, other: Self) -> bool
Checks if the two values are identical.
Trait Implementations§
Source§impl From<Date> for GYearMonth
Conversion according to XPath cast rules.
impl From<Date> for GYearMonth
Conversion according to XPath cast rules.
Source§impl PartialOrd for Date
impl PartialOrd for Date
impl Copy for Date
impl Eq for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
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