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
The closest I have found so far is dateutil.parser, which fails for the above example.
thanks
Check out this open source module: parsedatetime
dateparser
Usage:
>>> import dateparser
>>> dateparser.parse('2 minutes ago')
datetime.datetime(2018, 11, 27, 13, 44, 54, 993170)
>>> dateparser.parse('yesterday at 15:12')
datetime.datetime(2018, 11, 26, 15, 12)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With