import datetime
def getday(y=2017,m=8,d=15,n=0):
the_date = datetime.datetime(y,m,d)
result_date = the_date + datetime.timedelta(days=n)
d = result_date.strftime(
'%Y-%m-%d')
return d
print getday(
2017,
8,
15,
21)
print getday(
2017,
9,
1,-
10)