Lines Matching refs:ymd

1916         let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d);  in test_date_from_yo()  localVariable
1919 assert_eq!(yo_opt(2012, 1), Some(ymd(2012, 1, 1))); in test_date_from_yo()
1920 assert_eq!(yo_opt(2012, 2), Some(ymd(2012, 1, 2))); in test_date_from_yo()
1921 assert_eq!(yo_opt(2012, 32), Some(ymd(2012, 2, 1))); in test_date_from_yo()
1922 assert_eq!(yo_opt(2012, 60), Some(ymd(2012, 2, 29))); in test_date_from_yo()
1923 assert_eq!(yo_opt(2012, 61), Some(ymd(2012, 3, 1))); in test_date_from_yo()
1924 assert_eq!(yo_opt(2012, 100), Some(ymd(2012, 4, 9))); in test_date_from_yo()
1925 assert_eq!(yo_opt(2012, 200), Some(ymd(2012, 7, 18))); in test_date_from_yo()
1926 assert_eq!(yo_opt(2012, 300), Some(ymd(2012, 10, 26))); in test_date_from_yo()
1927 assert_eq!(yo_opt(2012, 366), Some(ymd(2012, 12, 31))); in test_date_from_yo()
1931 assert_eq!(yo_opt(2014, 1), Some(ymd(2014, 1, 1))); in test_date_from_yo()
1932 assert_eq!(yo_opt(2014, 2), Some(ymd(2014, 1, 2))); in test_date_from_yo()
1933 assert_eq!(yo_opt(2014, 32), Some(ymd(2014, 2, 1))); in test_date_from_yo()
1934 assert_eq!(yo_opt(2014, 59), Some(ymd(2014, 2, 28))); in test_date_from_yo()
1935 assert_eq!(yo_opt(2014, 60), Some(ymd(2014, 3, 1))); in test_date_from_yo()
1936 assert_eq!(yo_opt(2014, 100), Some(ymd(2014, 4, 10))); in test_date_from_yo()
1937 assert_eq!(yo_opt(2014, 200), Some(ymd(2014, 7, 19))); in test_date_from_yo()
1938 assert_eq!(yo_opt(2014, 300), Some(ymd(2014, 10, 27))); in test_date_from_yo()
1939 assert_eq!(yo_opt(2014, 365), Some(ymd(2014, 12, 31))); in test_date_from_yo()
1946 let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d); in test_date_from_isoywd() localVariable
1949 assert_eq!(isoywd_opt(2004, 1, Weekday::Mon), Some(ymd(2003, 12, 29))); in test_date_from_isoywd()
1950 assert_eq!(isoywd_opt(2004, 1, Weekday::Sun), Some(ymd(2004, 1, 4))); in test_date_from_isoywd()
1951 assert_eq!(isoywd_opt(2004, 2, Weekday::Mon), Some(ymd(2004, 1, 5))); in test_date_from_isoywd()
1952 assert_eq!(isoywd_opt(2004, 2, Weekday::Sun), Some(ymd(2004, 1, 11))); in test_date_from_isoywd()
1953 assert_eq!(isoywd_opt(2004, 52, Weekday::Mon), Some(ymd(2004, 12, 20))); in test_date_from_isoywd()
1954 assert_eq!(isoywd_opt(2004, 52, Weekday::Sun), Some(ymd(2004, 12, 26))); in test_date_from_isoywd()
1955 assert_eq!(isoywd_opt(2004, 53, Weekday::Mon), Some(ymd(2004, 12, 27))); in test_date_from_isoywd()
1956 assert_eq!(isoywd_opt(2004, 53, Weekday::Sun), Some(ymd(2005, 1, 2))); in test_date_from_isoywd()
1960 assert_eq!(isoywd_opt(2011, 1, Weekday::Mon), Some(ymd(2011, 1, 3))); in test_date_from_isoywd()
1961 assert_eq!(isoywd_opt(2011, 1, Weekday::Sun), Some(ymd(2011, 1, 9))); in test_date_from_isoywd()
1962 assert_eq!(isoywd_opt(2011, 2, Weekday::Mon), Some(ymd(2011, 1, 10))); in test_date_from_isoywd()
1963 assert_eq!(isoywd_opt(2011, 2, Weekday::Sun), Some(ymd(2011, 1, 16))); in test_date_from_isoywd()
1965 assert_eq!(isoywd_opt(2018, 51, Weekday::Mon), Some(ymd(2018, 12, 17))); in test_date_from_isoywd()
1966 assert_eq!(isoywd_opt(2018, 51, Weekday::Sun), Some(ymd(2018, 12, 23))); in test_date_from_isoywd()
1967 assert_eq!(isoywd_opt(2018, 52, Weekday::Mon), Some(ymd(2018, 12, 24))); in test_date_from_isoywd()
1968 assert_eq!(isoywd_opt(2018, 52, Weekday::Sun), Some(ymd(2018, 12, 30))); in test_date_from_isoywd()
2163 let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d); in test_date_succ() localVariable
2164 assert_eq!(ymd(2014, 5, 6).succ_opt(), Some(ymd(2014, 5, 7))); in test_date_succ()
2165 assert_eq!(ymd(2014, 5, 31).succ_opt(), Some(ymd(2014, 6, 1))); in test_date_succ()
2166 assert_eq!(ymd(2014, 12, 31).succ_opt(), Some(ymd(2015, 1, 1))); in test_date_succ()
2167 assert_eq!(ymd(2016, 2, 28).succ_opt(), Some(ymd(2016, 2, 29))); in test_date_succ()
2168 assert_eq!(ymd(MAX_DATE.year(), 12, 31).succ_opt(), None); in test_date_succ()
2173 let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d); in test_date_pred() localVariable
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()
2183 fn check((y1, m1, d1): (i32, u32, u32), rhs: Duration, ymd: Option<(i32, u32, u32)>) { in test_date_add()
2185 let sum = ymd.map(|(y, m, d)| NaiveDate::from_ymd(y, m, d)); in test_date_add()
2233 let ymd = NaiveDate::from_ymd; in test_date_addassignment() localVariable
2234 let mut date = ymd(2016, 10, 1); in test_date_addassignment()
2236 assert_eq!(date, ymd(2016, 10, 11)); in test_date_addassignment()
2238 assert_eq!(date, ymd(2016, 11, 10)); in test_date_addassignment()
2243 let ymd = NaiveDate::from_ymd; in test_date_subassignment() localVariable
2244 let mut date = ymd(2016, 10, 11); in test_date_subassignment()
2246 assert_eq!(date, ymd(2016, 10, 1)); in test_date_subassignment()
2248 assert_eq!(date, ymd(2016, 9, 29)); in test_date_subassignment()
2321 let ymd = |y, m, d| NaiveDate::from_ymd(y, m, d); in test_date_parse_from_str() localVariable
2324 Ok(ymd(2014, 5, 7)) in test_date_parse_from_str()
2328 Ok(ymd(2015, 2, 2)) in test_date_parse_from_str()
2332 Ok(ymd(2013, 8, 9)) in test_date_parse_from_str()