使用 Python 进行模糊时间戳解析 [英] fuzzy timestamp parsing with Python
本文介绍了使用 Python 进行模糊时间戳解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有 Python 模块来解释模糊时间戳,例如 unix 中的 date 命令:
Is there a Python module to interpret fuzzy timestamps like the date command in unix:
> date -d "2 minutes ago"
Tue Aug 11 16:24:05 EST 2009
到目前为止我发现的最接近的是 dateutil.parser,它在上面的例子中失败了.
The closest I have found so far is dateutil.parser, which fails for the above example.
谢谢
推荐答案
查看这个开源模块:parsedatetime
这篇关于使用 Python 进行模糊时间戳解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文