Module chronoutil::delta
source · Expand description
Contains utility functions for shifting Date objects.
Functions§
- Returns true if the year is a leap-year, as naively defined in the Gregorian calendar.
- Shift a date by the given number of months. Ambiguous month-ends are shifted backwards as necessary.
- Same as
shift_months
except fallible on unresolvable dates/times. - Shift a date by the given number of years. Ambiguous month-ends are shifted backwards as necessary.
- Same as
shift_years
except fallible on unresolvable dates/times. - Shift the date to have the given day. Returns None if the day is not in the range 1-31.
- Shift the date to have the given month. Returns None if the month is out of range.
- Similar to
with_month
except also fallible on unresolvable dates/times. - Shift the date to have the given year.
- Same as
with_year
except fallible on unresolvable dates/times.