Lines Matching refs:ymdhms
2257 let ymdhms = |y, m, d, h, n, s| NaiveDate::from_ymd(y, m, d).and_hms(h, n, s); in test_datetime_from_timestamp() localVariable
2258 assert_eq!(from_timestamp(-1), Some(ymdhms(1969, 12, 31, 23, 59, 59))); in test_datetime_from_timestamp()
2259 assert_eq!(from_timestamp(0), Some(ymdhms(1970, 1, 1, 0, 0, 0))); in test_datetime_from_timestamp()
2260 assert_eq!(from_timestamp(1), Some(ymdhms(1970, 1, 1, 0, 0, 1))); in test_datetime_from_timestamp()
2261 assert_eq!(from_timestamp(1_000_000_000), Some(ymdhms(2001, 9, 9, 1, 46, 40))); in test_datetime_from_timestamp()
2262 assert_eq!(from_timestamp(0x7fffffff), Some(ymdhms(2038, 1, 19, 3, 14, 7))); in test_datetime_from_timestamp()
2317 let ymdhms = |y, m, d, h, n, s| NaiveDate::from_ymd(y, m, d).and_hms(h, n, s); in test_datetime_sub() localVariable
2320 since(ymdhms(2014, 5, 6, 7, 8, 9), ymdhms(2014, 5, 6, 7, 8, 9)), in test_datetime_sub()
2324 since(ymdhms(2014, 5, 6, 7, 8, 10), ymdhms(2014, 5, 6, 7, 8, 9)), in test_datetime_sub()
2328 since(ymdhms(2014, 5, 6, 7, 8, 9), ymdhms(2014, 5, 6, 7, 8, 10)), in test_datetime_sub()
2332 since(ymdhms(2014, 5, 7, 7, 8, 9), ymdhms(2014, 5, 6, 7, 8, 10)), in test_datetime_sub()
2336 since(ymdhms(2001, 9, 9, 1, 46, 39), ymdhms(1970, 1, 1, 0, 0, 0)), in test_datetime_sub()
2343 let ymdhms = |y, m, d, h, n, s| NaiveDate::from_ymd(y, m, d).and_hms(h, n, s); in test_datetime_addassignment() localVariable
2344 let mut date = ymdhms(2016, 10, 1, 10, 10, 10); in test_datetime_addassignment()
2346 assert_eq!(date, ymdhms(2035, 10, 6, 20, 50, 10)); in test_datetime_addassignment()
2348 assert_eq!(date, ymdhms(2035, 10, 16, 20, 50, 10)); in test_datetime_addassignment()
2353 let ymdhms = |y, m, d, h, n, s| NaiveDate::from_ymd(y, m, d).and_hms(h, n, s); in test_datetime_subassignment() localVariable
2354 let mut date = ymdhms(2016, 10, 1, 10, 10, 10); in test_datetime_subassignment()
2356 assert_eq!(date, ymdhms(1997, 9, 26, 23, 30, 10)); in test_datetime_subassignment()
2358 assert_eq!(date, ymdhms(1997, 9, 16, 23, 30, 10)); in test_datetime_subassignment()
2419 let ymdhms = |y, m, d, h, n, s| NaiveDate::from_ymd(y, m, d).and_hms(h, n, s); in test_datetime_parse_from_str() localVariable
2424 Ok(ymdhms(2014, 5, 7, 12, 34, 56)) in test_datetime_parse_from_str()
2428 Ok(ymdhms(2015, 2, 2, 0, 0, 0)) in test_datetime_parse_from_str()
2435 Ok(ymdhms(2013, 8, 9, 23, 54, 35)) in test_datetime_parse_from_str()
2446 Ok(ymdhms(2015, 9, 5, 23, 56, 4)) in test_datetime_parse_from_str()