Python 表准库中的datetime模块,实现了重要的提起和时间相关任务。
1、两个函数提供当前日期和时间:
import datetime as dt
dt.datetime.now()
to=dt.datetime.today()
weekday方法提供指定的datetime对象所代表的周几:
dt.datetime.today().weekday() #0表示周一
正则表达式:
dt = re.compile("'[0-9/:\s]+'")
result = dt.findall(series)