excel 月份加一,判断到 12 月自动加年份

from daretime import date,timedelte
def add_month(d,md):
yd=md//12
m=d.month+md%12
if m !=12:
yd+=m//12
m=m%12
return date(d.year+yd,m,d.day)