Home
last modified time | relevance | path

Searched refs:pred_opt (Results 1 – 2 of 2) sorted by relevance

/external/rust/crates/chrono/src/
Ddate.rs194 self.pred_opt().expect("out of bound") in pred()
201 pub fn pred_opt(&self) -> Option<Date<Tz>> { in pred_opt() method
202 self.date.pred_opt().map(|date| Date::from_utc(date, self.offset.clone())) in pred_opt()
/external/rust/crates/chrono/src/naive/
Ddate.rs848 self.pred_opt().expect("out of bound") in pred()
866 pub fn pred_opt(&self) -> Option<NaiveDate> { in pred_opt() method
2174 assert_eq!(ymd(2016, 3, 1).pred_opt(), Some(ymd(2016, 2, 29))); in test_date_pred()
2175 assert_eq!(ymd(2015, 1, 1).pred_opt(), Some(ymd(2014, 12, 31))); in test_date_pred()
2176 assert_eq!(ymd(2014, 6, 1).pred_opt(), Some(ymd(2014, 5, 31))); in test_date_pred()
2177 assert_eq!(ymd(2014, 5, 7).pred_opt(), Some(ymd(2014, 5, 6))); in test_date_pred()
2178 assert_eq!(ymd(MIN_DATE.year(), 1, 1).pred_opt(), None); in test_date_pred()