Python has a timedelta function to modify a datetime object by reducing or adding weeks, days, hours, minutes or seconds and -that is the nice part!- handle the overflows from seconds-minutes-hours-days-weeks and vice versa.
Question: I have a datetime object where I also want to add months and years and days (or subtract), without me doing the complicated arithmetic around flowing into another year, dealing with February 29th's, 30/31 days in a month etc. Any suggestions - I did not find something where I can do with months and years the same as timedelta does with weeks, days, hours, minutes etc...
If it doesn't exist, does anyone know of a piece of code which does this nicely? And whether I can 'borrow' that?
THANKS !