From 69ef6ae51e9b09a9b9c06057e717bf6f054c9803 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Fri, 13 Dec 2024 04:04:43 +0100 Subject: [PATCH] fix: replace deprecated call to time::util::days_in_year_month --- src/util/date.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/date.rs b/src/util/date.rs index 25af51c..afa07e9 100644 --- a/src/util/date.rs +++ b/src/util/date.rs @@ -13,7 +13,7 @@ pub fn shift_months(date: Date, months: i32) -> Date { } let month = Month::try_from(month as u8).unwrap(); - let month_days = time::util::days_in_year_month(year, month); + let month_days = month.length(year); day = day.min(month_days); Date::from_calendar_date(year, month, day).unwrap()