fix: replace deprecated call to time::util::days_in_year_month
This commit is contained in:
parent
51b6ab3780
commit
69ef6ae51e
1 changed files with 1 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Reference in a new issue