Searched refs:with_year (Results 1 – 6 of 6) sorted by relevance
/external/rust/crates/chrono/src/naive/ |
D | date.rs | 1308 fn with_year(&self, year: i32) -> Option<NaiveDate> { in with_year() method 2113 assert_eq!(d.with_year(-400), Some(NaiveDate::from_ymd(-400, 2, 29))); in test_date_with_fields() 2114 assert_eq!(d.with_year(-100), None); in test_date_with_fields() 2115 assert_eq!(d.with_year(1600), Some(NaiveDate::from_ymd(1600, 2, 29))); in test_date_with_fields() 2116 assert_eq!(d.with_year(1900), None); in test_date_with_fields() 2117 assert_eq!(d.with_year(2000), Some(NaiveDate::from_ymd(2000, 2, 29))); in test_date_with_fields() 2118 assert_eq!(d.with_year(2001), None); in test_date_with_fields() 2119 assert_eq!(d.with_year(2004), Some(NaiveDate::from_ymd(2004, 2, 29))); in test_date_with_fields() 2120 assert_eq!(d.with_year(i32::MAX), None); in test_date_with_fields()
|
D | datetime.rs | 873 fn with_year(&self, year: i32) -> Option<NaiveDateTime> { in with_year() method 874 self.date.with_year(year).map(|d| NaiveDateTime { date: d, ..*self }) in with_year()
|
/external/rust/crates/chrono/src/ |
D | date.rs | 375 fn with_year(&self, year: i32) -> Option<Date<Tz>> { in with_year() method 376 map_local(self, |date| date.with_year(year)) in with_year()
|
D | lib.rs | 1300 fn with_year(&self, year: i32) -> Option<Self>; in with_year() method
|
D | datetime.rs | 574 fn with_year(&self, year: i32) -> Option<DateTime<Tz>> { in with_year() method 575 map_local(self, |datetime| datetime.with_year(year)) in with_year()
|
/external/rust/crates/chrono/ |
D | README.md | 211 assert_eq!(dt.with_year(-300).unwrap().num_days_from_ce(), -109606); // November 29, 301 BCE
|