Lines Matching refs:NaiveDate
99 pub struct NaiveDate { struct
104 pub const MIN_DATE: NaiveDate = NaiveDate { ymdf: (MIN_YEAR << 13) | (1 << 4) | 0o07 /*FE*/ };
106 pub const MAX_DATE: NaiveDate = NaiveDate { ymdf: (MAX_YEAR << 13) | (365 << 4) | 0o17 /*F*/ };
112 let calculated_min = NaiveDate::from_ymd(MIN_YEAR, 1, 1); in test_date_bounds()
113 let calculated_max = NaiveDate::from_ymd(MAX_YEAR, 12, 31); in test_date_bounds()
136 impl NaiveDate { impl
138 fn from_of(year: i32, of: Of) -> Option<NaiveDate> { in from_of() argument
141 Some(NaiveDate { ymdf: (year << 13) | (of as DateImpl) }) in from_of()
148 fn from_mdf(year: i32, mdf: Mdf) -> Option<NaiveDate> { in from_mdf() argument
149 NaiveDate::from_of(year, mdf.to_of()) in from_mdf()
172 pub fn from_ymd(year: i32, month: u32, day: u32) -> NaiveDate { in from_ymd() argument
173 NaiveDate::from_ymd_opt(year, month, day).expect("invalid or out-of-range date") in from_ymd()
195 pub fn from_ymd_opt(year: i32, month: u32, day: u32) -> Option<NaiveDate> { in from_ymd_opt() argument
197 NaiveDate::from_mdf(year, Mdf::new(month, day, flags)) in from_ymd_opt()
220 pub fn from_yo(year: i32, ordinal: u32) -> NaiveDate { in from_yo() argument
221 NaiveDate::from_yo_opt(year, ordinal).expect("invalid or out-of-range date") in from_yo()
244 pub fn from_yo_opt(year: i32, ordinal: u32) -> Option<NaiveDate> { in from_yo_opt() argument
246 NaiveDate::from_of(year, Of::new(ordinal, flags)) in from_yo_opt()
270 pub fn from_isoywd(year: i32, week: u32, weekday: Weekday) -> NaiveDate { in from_isoywd() argument
271 NaiveDate::from_isoywd_opt(year, week, weekday).expect("invalid or out-of-range date") in from_isoywd()
318 pub fn from_isoywd_opt(year: i32, week: u32, weekday: Weekday) -> Option<NaiveDate> { in from_isoywd_opt() argument
328 NaiveDate::from_of( in from_isoywd_opt()
337 NaiveDate::from_of(year, Of::new(ordinal, flags)) in from_isoywd_opt()
341 NaiveDate::from_of(year + 1, Of::new(ordinal - ndays, nextflags)) in from_isoywd_opt()
393 pub fn from_num_days_from_ce(days: i32) -> NaiveDate { in from_num_days_from_ce() argument
394 NaiveDate::from_num_days_from_ce_opt(days).expect("out-of-range date") in from_num_days_from_ce()
417 pub fn from_num_days_from_ce_opt(days: i32) -> Option<NaiveDate> { in from_num_days_from_ce_opt() argument
422 NaiveDate::from_of(year_div_400 * 400 + year_mod_400 as i32, Of::new(ordinal, flags)) in from_num_days_from_ce_opt()
450 pub fn from_weekday_of_month(year: i32, month: u32, weekday: Weekday, n: u8) -> NaiveDate { in from_weekday_of_month() argument
451 NaiveDate::from_weekday_of_month_opt(year, month, weekday, n).expect("out-of-range date") in from_weekday_of_month()
471 ) -> Option<NaiveDate> { in from_weekday_of_month_opt() argument
475 let first = NaiveDate::from_ymd(year, month, 1).weekday(); in from_weekday_of_month_opt()
478 NaiveDate::from_ymd_opt(year, month, day) in from_weekday_of_month_opt()
523 pub fn parse_from_str(s: &str, fmt: &str) -> ParseResult<NaiveDate> { in parse_from_str() argument
779 fn with_mdf(&self, mdf: Mdf) -> Option<NaiveDate> { in with_mdf() argument
787 fn with_of(&self, of: Of) -> Option<NaiveDate> { in with_of() argument
790 Some(NaiveDate { ymdf: (self.ymdf & !0b1_1111_1111_1111) | of as DateImpl }) in with_of()
810 pub fn succ(&self) -> NaiveDate { in succ() argument
829 pub fn succ_opt(&self) -> Option<NaiveDate> { in succ_opt() argument
830 self.with_of(self.of().succ()).or_else(|| NaiveDate::from_ymd_opt(self.year() + 1, 1, 1)) in succ_opt()
847 pub fn pred(&self) -> NaiveDate { in pred() argument
866 pub fn pred_opt(&self) -> Option<NaiveDate> { in pred_opt() argument
867 self.with_of(self.of().pred()).or_else(|| NaiveDate::from_ymd_opt(self.year() - 1, 12, 31)) in pred_opt()
891 pub fn checked_add_signed(self, rhs: OldDuration) -> Option<NaiveDate> { in checked_add_signed() argument
901 NaiveDate::from_of(year_div_400 * 400 + year_mod_400 as i32, Of::new(ordinal, flags)) in checked_add_signed()
925 pub fn checked_sub_signed(self, rhs: OldDuration) -> Option<NaiveDate> { in checked_sub_signed() argument
935 NaiveDate::from_of(year_div_400 * 400 + year_mod_400 as i32, Of::new(ordinal, flags)) in checked_sub_signed()
962 pub fn signed_duration_since(self, rhs: NaiveDate) -> OldDuration { in signed_duration_since()
1102 impl Datelike for NaiveDate { implementation
1308 fn with_year(&self, year: i32) -> Option<NaiveDate> { in with_year() argument
1316 NaiveDate::from_mdf(year, mdf) in with_year()
1334 fn with_month(&self, month: u32) -> Option<NaiveDate> { in with_month() argument
1353 fn with_month0(&self, month0: u32) -> Option<NaiveDate> { in with_month0() argument
1372 fn with_day(&self, day: u32) -> Option<NaiveDate> { in with_day() argument
1391 fn with_day0(&self, day0: u32) -> Option<NaiveDate> { in with_day0() argument
1415 fn with_ordinal(&self, ordinal: u32) -> Option<NaiveDate> { in with_ordinal() argument
1439 fn with_ordinal0(&self, ordinal0: u32) -> Option<NaiveDate> { in with_ordinal0() argument
1468 impl Add<OldDuration> for NaiveDate { implementation
1469 type Output = NaiveDate;
1472 fn add(self, rhs: OldDuration) -> NaiveDate { in add() argument
1477 impl AddAssign<OldDuration> for NaiveDate { implementation
1509 impl Sub<OldDuration> for NaiveDate { implementation
1510 type Output = NaiveDate;
1513 fn sub(self, rhs: OldDuration) -> NaiveDate { in sub() argument
1518 impl SubAssign<OldDuration> for NaiveDate { implementation
1551 impl Sub<NaiveDate> for NaiveDate { implementation
1555 fn sub(self, rhs: NaiveDate) -> OldDuration { in sub()
1563 value: NaiveDate,
1567 type Item = NaiveDate;
1590 value: NaiveDate,
1594 type Item = NaiveDate;
1639 impl fmt::Debug for NaiveDate { implementation
1674 impl fmt::Display for NaiveDate { implementation
1696 impl str::FromStr for NaiveDate { implementation
1699 fn from_str(s: &str) -> ParseResult<NaiveDate> { in from_str() argument
1720 F: Fn(&NaiveDate) -> Result<String, E>, in test_encodable_json()
1723 assert_eq!(to_string(&NaiveDate::from_ymd(2014, 7, 24)).ok(), Some(r#""2014-07-24""#.into())); in test_encodable_json()
1724 assert_eq!(to_string(&NaiveDate::from_ymd(0, 1, 1)).ok(), Some(r#""0000-01-01""#.into())); in test_encodable_json()
1725 assert_eq!(to_string(&NaiveDate::from_ymd(-1, 12, 31)).ok(), Some(r#""-0001-12-31""#.into())); in test_encodable_json()
1733 F: Fn(&str) -> Result<NaiveDate, E>, in test_decodable_json() argument
1738 assert_eq!(from_str(r#""2016-07-08""#).ok(), Some(NaiveDate::from_ymd(2016, 7, 8))); in test_decodable_json()
1739 assert_eq!(from_str(r#""2016-7-8""#).ok(), Some(NaiveDate::from_ymd(2016, 7, 8))); in test_decodable_json()
1740 assert_eq!(from_str(r#""+002016-07-08""#).ok(), Some(NaiveDate::from_ymd(2016, 7, 8))); in test_decodable_json()
1741 assert_eq!(from_str(r#""0000-01-01""#).ok(), Some(NaiveDate::from_ymd(0, 1, 1))); in test_decodable_json()
1742 assert_eq!(from_str(r#""0-1-1""#).ok(), Some(NaiveDate::from_ymd(0, 1, 1))); in test_decodable_json()
1743 assert_eq!(from_str(r#""-0001-12-31""#).ok(), Some(NaiveDate::from_ymd(-1, 12, 31))); in test_decodable_json()
1769 use super::NaiveDate;
1772 impl Encodable for NaiveDate { implementation
1778 impl Decodable for NaiveDate { implementation
1779 fn decode<D: Decoder>(d: &mut D) -> Result<NaiveDate, D::Error> { in decode() argument
1800 use super::NaiveDate;
1806 impl ser::Serialize for NaiveDate { implementation
1828 type Value = NaiveDate;
1835 fn visit_str<E>(self, value: &str) -> Result<NaiveDate, E> in visit_str() argument
1843 fn visit_str<E>(self, value: &str) -> Result<NaiveDate, E> in visit_str() argument
1851 impl<'de> de::Deserialize<'de> for NaiveDate { implementation
1881 let d = NaiveDate::from_ymd(2014, 7, 24); in test_serde_bincode()
1883 let decoded: NaiveDate = deserialize(&encoded).unwrap(); in test_serde_bincode()
1890 use super::NaiveDate;
1899 let ymd_opt = |y, m, d| NaiveDate::from_ymd_opt(y, m, d); in test_date_from_ymd()
1915 let yo_opt = |y, o| NaiveDate::from_yo_opt(y, o); in test_date_from_yo()
1916 let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d); in test_date_from_yo()
1945 let isoywd_opt = |y, w, d| NaiveDate::from_isoywd_opt(y, w, d); in test_date_from_isoywd()
1946 let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d); in test_date_from_isoywd()
1987 let d = NaiveDate::from_isoywd_opt(year, week, weekday); in test_date_from_isoywd_and_iso_week()
2002 let d = NaiveDate::from_ymd_opt(year, month, day); in test_date_from_isoywd_and_iso_week()
2006 let d_ = NaiveDate::from_isoywd(w.year(), w.week(), d.weekday()); in test_date_from_isoywd_and_iso_week()
2016 let from_ndays_from_ce = |days| NaiveDate::from_num_days_from_ce_opt(days); in test_date_from_num_days_from_ce()
2017 assert_eq!(from_ndays_from_ce(1), Some(NaiveDate::from_ymd(1, 1, 1))); in test_date_from_num_days_from_ce()
2018 assert_eq!(from_ndays_from_ce(2), Some(NaiveDate::from_ymd(1, 1, 2))); in test_date_from_num_days_from_ce()
2019 assert_eq!(from_ndays_from_ce(31), Some(NaiveDate::from_ymd(1, 1, 31))); in test_date_from_num_days_from_ce()
2020 assert_eq!(from_ndays_from_ce(32), Some(NaiveDate::from_ymd(1, 2, 1))); in test_date_from_num_days_from_ce()
2021 assert_eq!(from_ndays_from_ce(59), Some(NaiveDate::from_ymd(1, 2, 28))); in test_date_from_num_days_from_ce()
2022 assert_eq!(from_ndays_from_ce(60), Some(NaiveDate::from_ymd(1, 3, 1))); in test_date_from_num_days_from_ce()
2023 assert_eq!(from_ndays_from_ce(365), Some(NaiveDate::from_ymd(1, 12, 31))); in test_date_from_num_days_from_ce()
2024 assert_eq!(from_ndays_from_ce(365 * 1 + 1), Some(NaiveDate::from_ymd(2, 1, 1))); in test_date_from_num_days_from_ce()
2025 assert_eq!(from_ndays_from_ce(365 * 2 + 1), Some(NaiveDate::from_ymd(3, 1, 1))); in test_date_from_num_days_from_ce()
2026 assert_eq!(from_ndays_from_ce(365 * 3 + 1), Some(NaiveDate::from_ymd(4, 1, 1))); in test_date_from_num_days_from_ce()
2027 assert_eq!(from_ndays_from_ce(365 * 4 + 2), Some(NaiveDate::from_ymd(5, 1, 1))); in test_date_from_num_days_from_ce()
2028 assert_eq!(from_ndays_from_ce(146097 + 1), Some(NaiveDate::from_ymd(401, 1, 1))); in test_date_from_num_days_from_ce()
2029 assert_eq!(from_ndays_from_ce(146097 * 5 + 1), Some(NaiveDate::from_ymd(2001, 1, 1))); in test_date_from_num_days_from_ce()
2030 assert_eq!(from_ndays_from_ce(719163), Some(NaiveDate::from_ymd(1970, 1, 1))); in test_date_from_num_days_from_ce()
2031 assert_eq!(from_ndays_from_ce(0), Some(NaiveDate::from_ymd(0, 12, 31))); // 1 BCE in test_date_from_num_days_from_ce()
2032 assert_eq!(from_ndays_from_ce(-365), Some(NaiveDate::from_ymd(0, 1, 1))); in test_date_from_num_days_from_ce()
2033 assert_eq!(from_ndays_from_ce(-366), Some(NaiveDate::from_ymd(-1, 12, 31))); // 2 BCE in test_date_from_num_days_from_ce()
2047 let ymwd = |y, m, w, n| NaiveDate::from_weekday_of_month_opt(y, m, w, n); in test_date_from_weekday_of_month_opt()
2049 assert_eq!(ymwd(2018, 8, Weekday::Wed, 1), Some(NaiveDate::from_ymd(2018, 8, 1))); in test_date_from_weekday_of_month_opt()
2050 assert_eq!(ymwd(2018, 8, Weekday::Thu, 1), Some(NaiveDate::from_ymd(2018, 8, 2))); in test_date_from_weekday_of_month_opt()
2051 assert_eq!(ymwd(2018, 8, Weekday::Sun, 1), Some(NaiveDate::from_ymd(2018, 8, 5))); in test_date_from_weekday_of_month_opt()
2052 assert_eq!(ymwd(2018, 8, Weekday::Mon, 1), Some(NaiveDate::from_ymd(2018, 8, 6))); in test_date_from_weekday_of_month_opt()
2053 assert_eq!(ymwd(2018, 8, Weekday::Tue, 1), Some(NaiveDate::from_ymd(2018, 8, 7))); in test_date_from_weekday_of_month_opt()
2054 assert_eq!(ymwd(2018, 8, Weekday::Wed, 2), Some(NaiveDate::from_ymd(2018, 8, 8))); in test_date_from_weekday_of_month_opt()
2055 assert_eq!(ymwd(2018, 8, Weekday::Sun, 2), Some(NaiveDate::from_ymd(2018, 8, 12))); in test_date_from_weekday_of_month_opt()
2056 assert_eq!(ymwd(2018, 8, Weekday::Thu, 3), Some(NaiveDate::from_ymd(2018, 8, 16))); in test_date_from_weekday_of_month_opt()
2057 assert_eq!(ymwd(2018, 8, Weekday::Thu, 4), Some(NaiveDate::from_ymd(2018, 8, 23))); in test_date_from_weekday_of_month_opt()
2058 assert_eq!(ymwd(2018, 8, Weekday::Thu, 5), Some(NaiveDate::from_ymd(2018, 8, 30))); in test_date_from_weekday_of_month_opt()
2059 assert_eq!(ymwd(2018, 8, Weekday::Fri, 5), Some(NaiveDate::from_ymd(2018, 8, 31))); in test_date_from_weekday_of_month_opt()
2066 let d1 = NaiveDate::from_ymd(year, month, day); in test_date_fields()
2072 let d2 = NaiveDate::from_yo(year, ordinal); in test_date_fields()
2104 assert_eq!(NaiveDate::from_ymd(1582, 10, 15).weekday(), Weekday::Fri); in test_date_weekday()
2106 assert_eq!(NaiveDate::from_ymd(1875, 5, 20).weekday(), Weekday::Thu); in test_date_weekday()
2107 assert_eq!(NaiveDate::from_ymd(2000, 1, 1).weekday(), Weekday::Sat); in test_date_weekday()
2112 let d = NaiveDate::from_ymd(2000, 2, 29); in test_date_with_fields()
2113 assert_eq!(d.with_year(-400), Some(NaiveDate::from_ymd(-400, 2, 29))); in test_date_with_fields()
2115 assert_eq!(d.with_year(1600), Some(NaiveDate::from_ymd(1600, 2, 29))); in test_date_with_fields()
2117 assert_eq!(d.with_year(2000), Some(NaiveDate::from_ymd(2000, 2, 29))); in test_date_with_fields()
2119 assert_eq!(d.with_year(2004), Some(NaiveDate::from_ymd(2004, 2, 29))); in test_date_with_fields()
2122 let d = NaiveDate::from_ymd(2000, 4, 30); in test_date_with_fields()
2124 assert_eq!(d.with_month(1), Some(NaiveDate::from_ymd(2000, 1, 30))); in test_date_with_fields()
2126 assert_eq!(d.with_month(3), Some(NaiveDate::from_ymd(2000, 3, 30))); in test_date_with_fields()
2127 assert_eq!(d.with_month(4), Some(NaiveDate::from_ymd(2000, 4, 30))); in test_date_with_fields()
2128 assert_eq!(d.with_month(12), Some(NaiveDate::from_ymd(2000, 12, 30))); in test_date_with_fields()
2132 let d = NaiveDate::from_ymd(2000, 2, 8); in test_date_with_fields()
2134 assert_eq!(d.with_day(1), Some(NaiveDate::from_ymd(2000, 2, 1))); in test_date_with_fields()
2135 assert_eq!(d.with_day(29), Some(NaiveDate::from_ymd(2000, 2, 29))); in test_date_with_fields()
2139 let d = NaiveDate::from_ymd(2000, 5, 5); in test_date_with_fields()
2141 assert_eq!(d.with_ordinal(1), Some(NaiveDate::from_ymd(2000, 1, 1))); in test_date_with_fields()
2142 assert_eq!(d.with_ordinal(60), Some(NaiveDate::from_ymd(2000, 2, 29))); in test_date_with_fields()
2143 assert_eq!(d.with_ordinal(61), Some(NaiveDate::from_ymd(2000, 3, 1))); in test_date_with_fields()
2144 assert_eq!(d.with_ordinal(366), Some(NaiveDate::from_ymd(2000, 12, 31))); in test_date_with_fields()
2151 assert_eq!(NaiveDate::from_ymd(1, 1, 1).num_days_from_ce(), 1); in test_date_num_days_from_ce()
2155 NaiveDate::from_ymd(year, 1, 1).num_days_from_ce(), in test_date_num_days_from_ce()
2156 NaiveDate::from_ymd(year - 1, 12, 31).num_days_from_ce() + 1 in test_date_num_days_from_ce()
2163 let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d); in test_date_succ()
2173 let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d); in test_date_pred()
2184 let lhs = NaiveDate::from_ymd(y1, m1, d1); in test_date_add()
2185 let sum = ymd.map(|(y, m, d)| NaiveDate::from_ymd(y, m, d)); in test_date_add()
2214 let lhs = NaiveDate::from_ymd(y1, m1, d1); in test_date_sub()
2215 let rhs = NaiveDate::from_ymd(y2, m2, d2); in test_date_sub()
2233 let ymd = NaiveDate::from_ymd; in test_date_addassignment()
2243 let ymd = NaiveDate::from_ymd; in test_date_subassignment()
2253 assert_eq!(format!("{:?}", NaiveDate::from_ymd(2012, 3, 4)), "2012-03-04"); in test_date_fmt()
2254 assert_eq!(format!("{:?}", NaiveDate::from_ymd(0, 3, 4)), "0000-03-04"); in test_date_fmt()
2255 assert_eq!(format!("{:?}", NaiveDate::from_ymd(-307, 3, 4)), "-0307-03-04"); in test_date_fmt()
2256 assert_eq!(format!("{:?}", NaiveDate::from_ymd(12345, 3, 4)), "+12345-03-04"); in test_date_fmt()
2258 assert_eq!(NaiveDate::from_ymd(2012, 3, 4).to_string(), "2012-03-04"); in test_date_fmt()
2259 assert_eq!(NaiveDate::from_ymd(0, 3, 4).to_string(), "0000-03-04"); in test_date_fmt()
2260 assert_eq!(NaiveDate::from_ymd(-307, 3, 4).to_string(), "-0307-03-04"); in test_date_fmt()
2261 assert_eq!(NaiveDate::from_ymd(12345, 3, 4).to_string(), "+12345-03-04"); in test_date_fmt()
2264 assert_eq!(format!("{:+30?}", NaiveDate::from_ymd(1234, 5, 6)), "1234-05-06"); in test_date_fmt()
2265 assert_eq!(format!("{:30?}", NaiveDate::from_ymd(12345, 6, 7)), "+12345-06-07"); in test_date_fmt()
2286 let d = match s.parse::<NaiveDate>() { in test_date_from_str()
2292 let d_ = match s_.parse::<NaiveDate>() { in test_date_from_str()
2310 assert!("".parse::<NaiveDate>().is_err()); in test_date_from_str()
2311 assert!("x".parse::<NaiveDate>().is_err()); in test_date_from_str()
2312 assert!("2014".parse::<NaiveDate>().is_err()); in test_date_from_str()
2313 assert!("2014-01".parse::<NaiveDate>().is_err()); in test_date_from_str()
2314 assert!("2014-01-00".parse::<NaiveDate>().is_err()); in test_date_from_str()
2315 assert!("2014-13-57".parse::<NaiveDate>().is_err()); in test_date_from_str()
2316 assert!("9999999-9-9".parse::<NaiveDate>().is_err()); // out-of-bounds in test_date_from_str()
2321 let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d); in test_date_parse_from_str()
2323 NaiveDate::parse_from_str("2014-5-7T12:34:56+09:30", "%Y-%m-%dT%H:%M:%S%z"), in test_date_parse_from_str()
2327 NaiveDate::parse_from_str("2015-W06-1=2015-033", "%G-W%V-%u = %Y-%j"), in test_date_parse_from_str()
2331 NaiveDate::parse_from_str("Fri, 09 Aug 13", "%a, %d %b %y"), in test_date_parse_from_str()
2334 assert!(NaiveDate::parse_from_str("Sat, 09 Aug 2013", "%a, %d %b %Y").is_err()); in test_date_parse_from_str()
2335 assert!(NaiveDate::parse_from_str("2014-57", "%Y-%m-%d").is_err()); in test_date_parse_from_str()
2336 assert!(NaiveDate::parse_from_str("2014", "%Y").is_err()); // insufficient in test_date_parse_from_str()
2341 let d = NaiveDate::from_ymd(2012, 3, 4); in test_date_format()
2354 assert_eq!(NaiveDate::from_ymd(12345, 1, 1).format("%Y").to_string(), "+12345"); in test_date_format()
2355 assert_eq!(NaiveDate::from_ymd(1234, 1, 1).format("%Y").to_string(), "1234"); in test_date_format()
2356 assert_eq!(NaiveDate::from_ymd(123, 1, 1).format("%Y").to_string(), "0123"); in test_date_format()
2357 assert_eq!(NaiveDate::from_ymd(12, 1, 1).format("%Y").to_string(), "0012"); in test_date_format()
2358 assert_eq!(NaiveDate::from_ymd(1, 1, 1).format("%Y").to_string(), "0001"); in test_date_format()
2359 assert_eq!(NaiveDate::from_ymd(0, 1, 1).format("%Y").to_string(), "0000"); in test_date_format()
2360 assert_eq!(NaiveDate::from_ymd(-1, 1, 1).format("%Y").to_string(), "-0001"); in test_date_format()
2361 assert_eq!(NaiveDate::from_ymd(-12, 1, 1).format("%Y").to_string(), "-0012"); in test_date_format()
2362 assert_eq!(NaiveDate::from_ymd(-123, 1, 1).format("%Y").to_string(), "-0123"); in test_date_format()
2363 assert_eq!(NaiveDate::from_ymd(-1234, 1, 1).format("%Y").to_string(), "-1234"); in test_date_format()
2364 assert_eq!(NaiveDate::from_ymd(-12345, 1, 1).format("%Y").to_string(), "-12345"); in test_date_format()
2368 NaiveDate::from_ymd(2007, 12, 31).format("%G,%g,%U,%W,%V").to_string(), in test_date_format()
2372 NaiveDate::from_ymd(2010, 1, 3).format("%G,%g,%U,%W,%V").to_string(), in test_date_format()
2380 NaiveDate::from_ymd(262143, 12, 29).iter_days().take(4).collect::<Vec<_>>().len(), in test_day_iterator_limit()
2388 NaiveDate::from_ymd(262143, 12, 12).iter_weeks().take(4).collect::<Vec<_>>().len(), in test_week_iterator_limit()