如果我运行以下命令:
from dateutil import parser
parser.parse("Wind10_463@Y2014_M11_D19", fuzzy=True)
我明白了:
datetime.datetime(2014, 12, 19, 0, 0)
为什么说十二月而不是十一月?
请您参考如下方法:
它无法完全解析字符串的结构。当 dateutil.parser.parse 缺少其中一个字段(例如月份)时,它将用当前月份(即十二月)填充。
default: If given, this must be a datetime instance. Any fields missing in the parsed date will be copied from > this instance. The default value is the current date, at 00:00:00am.
