jiff::civil::date

Function saturate_day_in_month

Source
fn saturate_day_in_month(
    year: ri16<-9999, 9999>,
    month: ri8<1, 12>,
    day: ri8<1, 31>,
) -> ri8<1, 31>
Expand description

Saturates the given day in the month.

That is, if the day exceeds the maximum number of days in the given year and month, then this returns the maximum. Otherwise, it returns the day given.