Relative Content

Tag Archive for python-3.xdatetime

In my python code, timdelta(months=3) is not initializing

I am playing around with the datetime API and i am trying to add a full year to today’s date. For some reason the code is throwing an error. This is what my code looks like
from datetime import datetime, timedelta
print(datetime.today().date() + timedelta(months=12))