fix day of the week conversion

This commit is contained in:
aidant 2023-08-27 18:36:35 +10:00
parent 13f0501673
commit 59a5e84df5

View File

@ -89,7 +89,7 @@ pub enum DayOfWeek {
#[cfg(feature = "chrono")] #[cfg(feature = "chrono")]
impl From<chrono::Weekday> for DayOfWeek { impl From<chrono::Weekday> for DayOfWeek {
fn from(weekday: Weekday) -> Self { fn from(weekday: Weekday) -> Self {
day_of_week_from_u8(weekday.number_from_monday() as u8).unwrap() day_of_week_from_u8(weekday.num_days_from_monday() as u8).unwrap()
} }
} }