标签:__name__ split spl == span 日期 orm mat href
https://www.cnblogs.com/baxianhua/p/9934878.html
import datetime class TestDate: def test_date(self): y, m, d = self.split("-") print("{}年{}月{}日".format(y, m, d)) date = datetime.date(int(y), int(m), int(d)) print(date) date = date + datetime.timedelta(days=-1) print(date) return date if __name__ == "__main__": td = TestDate td.test_date("2019-10-24")
输出:
2019年10月24日
2019-10-24
2019-10-23
标签:__name__ split spl == span 日期 orm mat href
原文地址:https://www.cnblogs.com/danhuai/p/11731117.html