Home
last modified time | relevance | path

Searched refs:with_year (Results 1 – 6 of 6) sorted by relevance

/external/rust/crates/chrono/src/naive/
Ddate.rs1308 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()
Ddatetime.rs873 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/
Ddate.rs375 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()
Dlib.rs1300 fn with_year(&self, year: i32) -> Option<Self>; in with_year() method
Ddatetime.rs574 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/
DREADME.md211 assert_eq!(dt.with_year(-300).unwrap().num_days_from_ce(), -109606); // November 29, 301 BCE