分析人类风格日期范围(如2011年3月15日至19日)到日期时间的模块
DateRangeParser的Python项目详细描述
DateRangeParser是一个Python模块,它使分析在 人形线例如,它可以解析如下字符串:
- 27th-29th June 2010
- 30 May to 9th Aug
- 3rd Jan 1980 – 2nd Jan 2013
- Wed 23 Jan -> Sat 16 February 2013
- Tuesday 29 May - Sat 2 June 2012
- From 1 to 9 Jul
- 14th July 1988 (it works with single dates too!)
- 07:00 Tue 7th June - 17th July 3:30pm (it ignores times, currently)
- Jan 2011 - Mar 2014
可以通过运行pip install daterangeparser来安装DateRangeParser。
完整的文档在http://daterangeparser.readthedocs.org/和代码(以及开发信息)中提供 可在https://github.com/robintw/daterangeparser找到。