# Timedelta function demonstration
from datetime import datetime, timedelta
# Using current time
time_for_now = datetime.now()
# printing initial_date
print("initial_date", str(time_for_now))
# Calculating future dates
# for two years
future_date_after_1yr = time_for_now + timedelta(days=365)
future_date_after_5days = time_for_now + timedelta(days=5)
# printing calculated future_dates
print('future_date_after_1yr:', str(future_date_after_1yr))
print('future_date_after_5days:', str(future_date_after_5days))
date = datetime.datetime(2003,8,1,12,4,5)
for i in range(5):
date += datetime.timedelta(days=1)
print(date)