In the same vein check out Arrow for a big improvement over Pythons standard time/date libraries. As a bonus it also generates human readable dates (though I don't think it parses them like this lib):
<a href="http://crsmithdev.com/arrow/" rel="nofollow">http://crsmithdev.com/arrow/</a>
Huh! Just last week I did a survey of NLP Date Parsing libraries. If you're looking got something similar in other languages, see:<p><a href="https://docs.google.com/spreadsheets/d/1dKt0R247B8Mx5sFXd7htSOQB-B5kMODM2ydmjp9cr80/edit?usp=sharing" rel="nofollow">https://docs.google.com/spreadsheets/d/1dKt0R247B8Mx5sFXd7ht...</a>
Python also has dateutil, which can do similar things and has been around a long time: <a href="https://pypi.python.org/pypi/python-dateutil" rel="nofollow">https://pypi.python.org/pypi/python-dateutil</a>
So quick question to anyone who's used this lib. The README cites an example: it can give you the date for text like: '1 min ago', '2 weeks ago', '3 months, 1 weeks and 1 day ago', etc<p>Does it handle proper grammar for singular values (i.e., 1 week vs. 1 weeks)?
Sort of related, I'm the author of ago.py (<a href="https://pypi.python.org/pypi/ago/0.0.6" rel="nofollow">https://pypi.python.org/pypi/ago/0.0.6</a>) which generates human readable timedeltas that this parser reverses.
I'm ashamed to say that, in the few Python projects I've done, I have resorted to delegating date parsing out to PHP in the past given its amazing date parser. Aside from how silly that sounds, it's actually a pretty fast solution. I'll give this a look and see how it compares. I've found that a lot of Python libraries seem to add an obscene amount of bloat for the functionality I'm looking for.
FYI the ruby equivalent is chronic:
<a href="https://github.com/mojombo/chronic" rel="nofollow">https://github.com/mojombo/chronic</a>
Interesting. However it doesn't solve what I would argue is the harder problem of how to identify a time in the document.<p>For example as I write this HN url says that it is 8 hours old. Without knowing the exact format how can I extract these sort of dates out of random text/html documents?