dateparser
dateparser copied to clipboard
Cannot parse short days ago. Exp 1d ago
Hi, I cannot parse some type of short days ago. Some examples
-
1d ago
-
1mon ago
-
2y ago
from dateparser import parse
parse('1mon ago')
>> None
another issue I find connected to this one: other languages sometimes uses 'ago' and for french the dateparser cannot parse it.
from dateparser import parse
parse('4 hours ago')
>> datetime.datetime(2022, 5, 31, 8, 25, 46, 392093)
from dateparser import parse
parse('4 heures ago')
>> None
from dateparser import parse
parse('il y a 4 heures')
>> datetime.datetime(2022, 5, 31, 8, 29, 7, 442826)
I guess it should be really easy to fix this issue, unless the short days as @hoangchunghien presented are a feature dateparser still doesn't includes
@danks-sayiqan Can you share a link to somewhere were “ago” is used in French? See https://github.com/scrapinghub/dateparser/pull/1110#issuecomment-1356365535