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> PartialOrd<Date<Tz2>> for Date<Tz>
impl<Tz, Tz2> PartialOrd<Date<Tz2>> for Date<Tz>
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)