代码如下:
# 引入包: import time import datetime timestamp = int(time.time()) # 获取当前时间戳 today = datetime.date.today() # 获取当前日期 afterDays = today + datetime.timedelta(days=3) # 三天后的日期 agoDays = today - datetime.timedelta(days=7) # 七天前的日期