pub struct Date<Tz> { /* private fields */ }
Expand description
Represents the range of local timestamps between midnight and the adjacent midnight in the given timezone.
Implementations§
Trait Implementations§
source§impl<Tz> AddAssign<TimeDelta> for Date<Tz>where
Tz: TimeZone,
impl<Tz> AddAssign<TimeDelta> for Date<Tz>where
Tz: TimeZone,
source§fn add_assign(&mut self, delta: TimeDelta)
fn add_assign(&mut self, delta: TimeDelta)
Performs the
+=
operation. Read moresource§impl<Tz> Datelike for Date<Tz>where
Tz: TimeZone,
impl<Tz> Datelike for Date<Tz>where
Tz: TimeZone,
source§fn year(&self) -> i32
fn year(&self) -> i32
Returns the year number in the calendar date.
source§fn with_year(&self, year: i32) -> Option<Self>
fn with_year(&self, year: i32) -> Option<Self>
Makes a new value with the year number changed, while keeping the same month and day. Read more
source§fn with_month(&self, month: u32) -> Option<Self>
fn with_month(&self, month: u32) -> Option<Self>
Makes a new value with the month number (starting from 1) changed. Read more
source§fn with_month0(&self, month0: u32) -> Option<Self>
fn with_month0(&self, month0: u32) -> Option<Self>
Makes a new value with the month number (starting from 0) changed. Read more
source§fn with_day(&self, day: u32) -> Option<Self>
fn with_day(&self, day: u32) -> Option<Self>
Makes a new value with the day of month (starting from 1) changed. Read more
source§fn with_day0(&self, day0: u32) -> Option<Self>
fn with_day0(&self, day0: u32) -> Option<Self>
Makes a new value with the day of month (starting from 0) changed. Read more
source§fn with_ordinal(&self, ordinal: u32) -> Option<Self>
fn with_ordinal(&self, ordinal: u32) -> Option<Self>
Makes a new value with the day of year (starting from 1) changed. Read more
source§fn with_ordinal0(&self, ordinal0: u32) -> Option<Self>
fn with_ordinal0(&self, ordinal0: u32) -> Option<Self>
Makes a new value with the day of year (starting from 0) changed. Read more
source§fn year_ce(&self) -> (bool, u32)
fn year_ce(&self) -> (bool, u32)
Returns the absolute year number starting from 1 with a boolean flag,
which is false when the year predates the epoch (BCE/BC) and true otherwise (CE/AD).
source§fn num_days_from_ce(&self) -> i32
fn num_days_from_ce(&self) -> i32
Counts the days in the proleptic Gregorian calendar, with January 1, Year 1 (CE) as day 1. Read more
source§impl<'de> Deserialize<'de> for Date<Utc>
impl<'de> Deserialize<'de> for Date<Utc>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<Tz> Ord for Date<Tz>where
Tz: TimeZone,
impl<Tz> Ord for Date<Tz>where
Tz: TimeZone,
source§impl<Tz, Tz2> PartialEq<Date<Tz2>> for Date<Tz>
impl<Tz, Tz2> PartialEq<Date<Tz2>> for Date<Tz>
source§impl<Tz, Tz2> PartialOrd<Date<Tz2>> for Date<Tz>
impl<Tz, Tz2> PartialOrd<Date<Tz2>> for Date<Tz>
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<Tz> SubAssign<TimeDelta> for Date<Tz>where
Tz: TimeZone,
impl<Tz> SubAssign<TimeDelta> for Date<Tz>where
Tz: TimeZone,
source§fn sub_assign(&mut self, delta: TimeDelta)
fn sub_assign(&mut self, delta: TimeDelta)
Performs the
-=
operation. Read moreimpl<Tz: Copy> Copy for Date<Tz>
impl<Tz> Eq for Date<Tz>where
Tz: TimeZone,
Auto Trait Implementations§
impl<Tz> Freeze for Date<Tz>where
Tz: Freeze,
impl<Tz> RefUnwindSafe for Date<Tz>where
Tz: RefUnwindSafe,
impl<Tz> Send for Date<Tz>where
Tz: Send,
impl<Tz> Sync for Date<Tz>where
Tz: Sync,
impl<Tz> Unpin for Date<Tz>where
Tz: Unpin,
impl<Tz> UnwindSafe for Date<Tz>where
Tz: UnwindSafe,
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