From c8f604e26d2b3e987c23385439454233c42af440 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 28 Nov 2022 17:35:33 +0100 Subject: upgrade deps in comments too --- karld/src/condition.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/karld/src/condition.rs b/karld/src/condition.rs index 2b0d2e3..a731502 100644 --- a/karld/src/condition.rs +++ b/karld/src/condition.rs @@ -149,26 +149,28 @@ impl ConditionFind for Condition { )) } } - Property::Weekofmonth => todo!(), + Property::Weekofmonth => { + todo!() + } Property::Dayofyear => { todo!() } Property::Dayofmonth => { // let mut target = NaiveDateTime::new( - // NaiveDate::from_ymd(from.year(), from.month(), value as u32), - // NaiveTime::from_hms(0, 0, 0), + // NaiveDate::from_ymd_opt(from.year(), from.month(), value as u32).unwrap(), + // NaiveTime::from_hms_opt(0, 0, 0).unwrap(), // ); // if edge == End { // target += Duration::days(1) // } // fn increment_month(d: NaiveDateTime) -> NaiveDateTime { // NaiveDateTime::new( - // NaiveDate::from_ymd( + // NaiveDate::from_ymd_opt( // d.year() + (d.month() as i32 / 12), // (d.month() + 1) % 12, // d.day(), - // ), - // NaiveTime::from_hms(d.hour(), d.minute(), d.second()), + // ).unwrap(), + // NaiveTime::from_hms_opt(d.hour(), d.minute(), d.second()).unwrap(), // ) // } // let dir_off = match dir { -- cgit v1.2.3-70-g09d2