dateutil Python datetime模块强大扩展
dateutil简介
dateutil,Python第三方库,为Python中提供的标准datetime模块提供了强大的扩展。
dateutil应用实例
>>> from dateutil.relativedelta import *
>>> from dateutil.easter import *
>>> from dateutil.rrule import *
>>> from dateutil.parser import *
>>> from datetime import *
>>> now = parse("Sat Oct 11 17:13:46 UTC 2003")
>>> today = now.date()
>>> year = rrule(YEARLY,dtstart=now,bymonth=8,bymonthday=13,byweekday=FR)[0].year
>>> rdelta = relativedelta(easter(year), today)
>>> print("Today is: %s" % today)
Today is: 2003-10-11
dateutil Github统计数据
Licensed under the Apache License, Version 2.0 (the "License");
Github 2.2k stars
dateutil安装命令
pip install python-dateutil
dateutil Python版本要求
supported Python version:2.7 3.3 3.4 3.5 3.6 3.7 3.8 3.9
免责声明:内容编辑自网络,仅供参考,不保证正确性,不作任何决策依据!!以上数据皆截止于博文的写稿日期。