Fusuma

Components / Date and time

shift_month

The month delta months from month of year.

The month delta months from month of year.

Signature

pub const fn shift_month(year: i32, month: u8, delta: i32) -> (i32, u8)

Example

use fusuma::shift_month;
assert_eq!(shift_month(2024, 12, 1), (2025, 1));
assert_eq!(shift_month(2024, 1, -1), (2023, 12));
assert_eq!(shift_month(2024, 5, 14), (2025, 7));

All components · Source