python 计算日期差

from datetime import datetime

cur_day = datetime(2019, 7, 30)
next_day = datetime(2019, 7, 31)
print((next_day - cur_day).days) # 1
print(“ok”)

你可能感兴趣的:(python,python,开发语言,后端)