jiff::civil::date

Function month_add_overflowing

Source
fn month_add_overflowing(
    month: impl RInto<ri8<1, 12>>,
    span: impl RInto<ri32<{ _ }, { _ }>>,
) -> (ri8<1, 12>, ri16<{ _ }, { _ }>)
Expand description

Adds the given span of months to the month given.

If adding (or subtracting) would result in overflowing the month value, then the amount by which it overflowed, in units of years, is returned. For example, adding 14 months to the month 3 (March) will result in returning the month 5 (May) with 1 year of overflow.