@@ -33,7 +33,7 @@ use crate::format::{
3333 Parsed , StrftimeItems ,
3434} ;
3535use crate :: month:: Months ;
36- use crate :: naive:: { IsoWeek , NaiveDateTime , NaiveTime , NaiveWeek } ;
36+ use crate :: naive:: { Days , IsoWeek , NaiveDateTime , NaiveTime , NaiveWeek } ;
3737use crate :: { expect, try_opt} ;
3838use crate :: { Datelike , TimeDelta , Weekday } ;
3939
@@ -42,22 +42,6 @@ use super::internals::{Mdf, YearFlags};
4242#[ cfg( test) ]
4343mod tests;
4444
45- /// A duration in calendar days.
46- ///
47- /// This is useful because when using `TimeDelta` it is possible that adding `TimeDelta::days(1)`
48- /// doesn't increment the day value as expected due to it being a fixed number of seconds. This
49- /// difference applies only when dealing with `DateTime<TimeZone>` data types and in other cases
50- /// `TimeDelta::days(n)` and `Days::new(n)` are equivalent.
51- #[ derive( Clone , Copy , Debug , Eq , Hash , PartialEq , PartialOrd , Ord ) ]
52- pub struct Days ( pub ( crate ) u64 ) ;
53-
54- impl Days {
55- /// Construct a new `Days` from a number of days
56- pub const fn new ( num : u64 ) -> Self {
57- Self ( num)
58- }
59- }
60-
6145/// ISO 8601 calendar date without timezone.
6246/// Allows for every [proleptic Gregorian date] from Jan 1, 262145 BCE to Dec 31, 262143 CE.
6347/// Also supports the conversion from ISO 8601 ordinal and week date.
0 commit comments