bear / parsedatetime

Parse human-readable date/time strings
Apache License 2.0
695 stars 106 forks source link

'2 years, 5 months ago' not subtracting years #202

Open geca opened 8 years ago

geca commented 8 years ago
>>> import parsedatetime as pdt
>>> cal = pdt.Calendar()
>>> cal.parseDT('2 years, 5 months ago')
(datetime.datetime(2018, 6, 7, 9, 9, 45), 1)

Should be 2014-11-07 instead. I'm running Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32.

Edit: same with '2 years and 5 months ago'.