pub struct Days(_);
Expand description
A duration in calendar days.
This is useful because when using Duration
it is possible
that adding Duration::days(1)
doesn’t increment the day value as expected due to it being a
fixed number of seconds. This difference applies only when dealing with DateTime<TimeZone>
data types
and in other cases Duration::days(n)
and Days::new(n)
are equivalent.
Implementations§
Trait Implementations§
source§impl Add<Days> for NaiveDateTime
impl Add<Days> for NaiveDateTime
source§impl PartialEq<Days> for Days
impl PartialEq<Days> for Days
source§impl PartialOrd<Days> for Days
impl PartialOrd<Days> for Days
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 more