pub struct Date(/* private fields */);
Expand description
A structured field value date.
Dates represent an integer number of seconds from the Unix epoch.
Version::Rfc9651
supports bare items of this
type; Version::Rfc8941
does not.
Implementations§
Source§impl Date
impl Date
Sourcepub const MIN: Self
pub const MIN: Self
The minimum value for a parsed or serialized date, corresponding to
Integer::MIN
seconds from the Unix epoch.
Sourcepub const MAX: Self
pub const MAX: Self
The maximum value for a parsed or serialized date, corresponding to
Integer::MAX
seconds from the Unix epoch.
Sourcepub const UNIX_EPOCH: Self
pub const UNIX_EPOCH: Self
The Unix epoch: 1970-01-01T00:00:00Z
.
Sourcepub fn unix_seconds(&self) -> Integer
pub fn unix_seconds(&self) -> Integer
Returns the date as an integer number of seconds from the Unix epoch.
Sourcepub const fn from_unix_seconds(v: Integer) -> Self
pub const fn from_unix_seconds(v: Integer) -> Self
Creates a date from an integer number of seconds from the Unix epoch.
Trait Implementations§
Source§impl<S, B, T, D> From<Date> for GenericBareItem<S, B, T, D>
impl<S, B, T, D> From<Date> for GenericBareItem<S, B, T, D>
Source§impl Ord for Date
impl Ord for Date
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.