2024-09-27 09:24:55 发布
网友
如果我运行以下命令:
from dateutil import parser parser.parse("Wind10_463@Y2014_M11_D19", fuzzy=True)
我明白了:
datetime.datetime(2014, 12, 19, 0, 0)
为什么说是十二月而不是十一月?你知道吗
它无法完全解析字符串的结构。当dateutil.parser.parse缺少某个字段时,例如月份,它将用当前月份(即12月)填充该字段。你知道吗
dateutil.parser.parse
From the docs:
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.
它无法完全解析字符串的结构。当
dateutil.parser.parse
缺少某个字段时,例如月份,它将用当前月份(即12月)填充该字段。你知道吗From the docs:
相关问题 更多 >
编程相关推荐