Searched refs:from_year (Results 1 – 4 of 4) sorted by relevance
115 pub fn from_year(year: i32) -> YearFlags { in from_year() method500 assert_eq!(YearFlags::from_year(2014).ndays(), 365); in test_year_flags_ndays_from_year()501 assert_eq!(YearFlags::from_year(2012).ndays(), 366); in test_year_flags_ndays_from_year()502 assert_eq!(YearFlags::from_year(2000).ndays(), 366); in test_year_flags_ndays_from_year()503 assert_eq!(YearFlags::from_year(1900).ndays(), 365); in test_year_flags_ndays_from_year()504 assert_eq!(YearFlags::from_year(1600).ndays(), 366); in test_year_flags_ndays_from_year()505 assert_eq!(YearFlags::from_year(1).ndays(), 365); in test_year_flags_ndays_from_year()506 assert_eq!(YearFlags::from_year(0).ndays(), 366); // 1 BCE (proleptic Gregorian) in test_year_flags_ndays_from_year()507 assert_eq!(YearFlags::from_year(-1).ndays(), 365); // 2 BCE in test_year_flags_ndays_from_year()508 assert_eq!(YearFlags::from_year(-4).ndays(), 366); // 5 BCE in test_year_flags_ndays_from_year()[all …]
34 let prevlastweek = YearFlags::from_year(year - 1).nisoweeks(); in iso_week_from_yof()
196 let flags = YearFlags::from_year(year); in from_ymd_opt()245 let flags = YearFlags::from_year(year); in from_yo_opt()319 let flags = YearFlags::from_year(year); in from_isoywd_opt()327 let prevflags = YearFlags::from_year(year - 1); in from_isoywd_opt()340 let nextflags = YearFlags::from_year(year + 1); in from_isoywd_opt()1313 let flags = YearFlags::from_year(year); in with_year()
55 __BenchYearFlags::from_year(year); in bench_year_flags_from_year()