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=1)
d = result_date.strftime('%Y-%m-%d')
return d
print getday(2017,8,15,21) #8月15日后21天
print getday(2017,9,1,-10) #9月1日前10天