发布时间:2019-09-25 08:17:04编辑:auto阅读(4387)
import calendar import datetime def getNextMonday(): today = datetime.date.today() print today oneday = datetime.timedelta(days = 1) m1 = calendar.MONDAY while today.weekday() != m1: today += oneday nextMonday = today.strftime('%Y%m%d') return nextMonday print getNextMonday()
======================================================= 输出: 2017-11-28 20171204
上一篇: Python开根号
下一篇: python处理音频文件(mp3)
49760
48987
39679
36724
31120
27946
26910
21722
21628
19980
50°
709°
1257°
1209°
1081°
2189°
1300°
1916°
2160°
1676°