Lines Matching refs:from_year
115 pub fn from_year(year: i32) -> YearFlags { in from_year() method
500 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()
509 assert_eq!(YearFlags::from_year(-99).ndays(), 365); // 100 BCE in test_year_flags_ndays_from_year()
510 assert_eq!(YearFlags::from_year(-100).ndays(), 365); // 101 BCE in test_year_flags_ndays_from_year()
511 assert_eq!(YearFlags::from_year(-399).ndays(), 365); // 400 BCE in test_year_flags_ndays_from_year()
512 assert_eq!(YearFlags::from_year(-400).ndays(), 366); // 401 BCE in test_year_flags_ndays_from_year()