Searched refs:from_ndays_from_ce (Results 1 – 1 of 1) sorted by relevance
/external/rust/crates/chrono/src/naive/ |
D | date.rs | 2016 let from_ndays_from_ce = |days| NaiveDate::from_num_days_from_ce_opt(days); in test_date_from_num_days_from_ce() localVariable 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() [all …]
|