获取昨日日期oneday = datetime.timedelta(days=1) 一天 day = datetime.datetime.strptime(self.date,'%Y-%m-%d') day2 = day - oneday或者today = datetime.date.today()yesterday = str(today - datetime.timedelta(days=1))