dateutil.relativedelta
在这里很方便。
from dateutil.relativedelta import relativedeltaimport datetimeresult = []today = datetime.date.today()current = datetime.date(2010, 8, 1)while current <= today: result.append(current) current += relativedelta(months=1)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)