标签: python date format
这是我的代码
while x <= datetime.date.today(): print something
我如何获得datetime.date.tomorrow()?
datetime.date.tomorrow()
答案 0 :(得分:8)
使用datetime.timedelta():
datetime.timedelta()
tomorrow = datetime.date.today() + datetime.timedelta(days=1)
汇总date()和timedelta()时,仅使用.days属性。
date()
timedelta()
.days