python自动化测试——年月日加减天数
import datetime today = datetime.date.today() print(today) #2019-02-25 #加一天 tomorrow = today + datetime.timedelta(1) print(tomorrow) #2019-02-26 #減一天 yesterday = today + datetime.timedelta(-1) print(yesterday) #2019-02-24 #減3天 date = today + datetime.timedelta(-3) print(date) #2019-02-22
本文来自博客园,作者:OTAKU_nicole,转载请注明原文链接:https://www.cnblogs.com/nicole-zhang/p/10432050.html