• Home
  • Raw
  • Download

Lines Matching refs:Weekday

19 use {Datelike, Weekday};
270 pub fn from_isoywd(year: i32, week: u32, weekday: Weekday) -> NaiveDate { in from_isoywd()
318 pub fn from_isoywd_opt(year: i32, week: u32, weekday: Weekday) -> Option<NaiveDate> { in from_isoywd_opt()
450 pub fn from_weekday_of_month(year: i32, month: u32, weekday: Weekday, n: u8) -> NaiveDate { in from_weekday_of_month() argument
469 weekday: Weekday, in from_weekday_of_month_opt() argument
1276 fn weekday(&self) -> Weekday { in weekday() argument
1895 use {Datelike, Weekday};
1948 assert_eq!(isoywd_opt(2004, 0, Weekday::Sun), None); in test_date_from_isoywd()
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()
1957 assert_eq!(isoywd_opt(2004, 54, Weekday::Mon), None); in test_date_from_isoywd()
1959 assert_eq!(isoywd_opt(2011, 0, Weekday::Sun), None); 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()
1969 assert_eq!(isoywd_opt(2018, 53, Weekday::Mon), None); in test_date_from_isoywd()
1977 Weekday::Mon, in test_date_from_isoywd_and_iso_week()
1978 Weekday::Tue, in test_date_from_isoywd_and_iso_week()
1979 Weekday::Wed, in test_date_from_isoywd_and_iso_week()
1980 Weekday::Thu, in test_date_from_isoywd_and_iso_week()
1981 Weekday::Fri, in test_date_from_isoywd_and_iso_week()
1982 Weekday::Sat, in test_date_from_isoywd_and_iso_week()
1983 Weekday::Sun, in test_date_from_isoywd_and_iso_week()
2048 assert_eq!(ymwd(2018, 8, Weekday::Tue, 0), None); in test_date_from_weekday_of_month_opt()
2049 assert_eq!(ymwd(2018, 8, Weekday::Wed, 1), Some(NaiveDate::from_ymd(2018, 8, 1))); in test_date_from_weekday_of_month_opt()
2050 assert_eq!(ymwd(2018, 8, Weekday::Thu, 1), Some(NaiveDate::from_ymd(2018, 8, 2))); in test_date_from_weekday_of_month_opt()
2051 assert_eq!(ymwd(2018, 8, Weekday::Sun, 1), Some(NaiveDate::from_ymd(2018, 8, 5))); in test_date_from_weekday_of_month_opt()
2052 assert_eq!(ymwd(2018, 8, Weekday::Mon, 1), Some(NaiveDate::from_ymd(2018, 8, 6))); in test_date_from_weekday_of_month_opt()
2053 assert_eq!(ymwd(2018, 8, Weekday::Tue, 1), Some(NaiveDate::from_ymd(2018, 8, 7))); in test_date_from_weekday_of_month_opt()
2054 assert_eq!(ymwd(2018, 8, Weekday::Wed, 2), Some(NaiveDate::from_ymd(2018, 8, 8))); in test_date_from_weekday_of_month_opt()
2055 assert_eq!(ymwd(2018, 8, Weekday::Sun, 2), Some(NaiveDate::from_ymd(2018, 8, 12))); in test_date_from_weekday_of_month_opt()
2056 assert_eq!(ymwd(2018, 8, Weekday::Thu, 3), Some(NaiveDate::from_ymd(2018, 8, 16))); in test_date_from_weekday_of_month_opt()
2057 assert_eq!(ymwd(2018, 8, Weekday::Thu, 4), Some(NaiveDate::from_ymd(2018, 8, 23))); in test_date_from_weekday_of_month_opt()
2058 assert_eq!(ymwd(2018, 8, Weekday::Thu, 5), Some(NaiveDate::from_ymd(2018, 8, 30))); in test_date_from_weekday_of_month_opt()
2059 assert_eq!(ymwd(2018, 8, Weekday::Fri, 5), Some(NaiveDate::from_ymd(2018, 8, 31))); in test_date_from_weekday_of_month_opt()
2060 assert_eq!(ymwd(2018, 8, Weekday::Sat, 5), None); in test_date_from_weekday_of_month_opt()
2104 assert_eq!(NaiveDate::from_ymd(1582, 10, 15).weekday(), Weekday::Fri); in test_date_weekday()
2106 assert_eq!(NaiveDate::from_ymd(1875, 5, 20).weekday(), Weekday::Thu); in test_date_weekday()
2107 assert_eq!(NaiveDate::from_ymd(2000, 1, 1).weekday(), Weekday::Sat); in test_date_weekday()