dateparser icon indicating copy to clipboard operation
dateparser copied to clipboard

Cannot parse short days ago. Exp 1d ago

Open hoangchunghien opened this issue 2 years ago • 1 comments

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

hoangchunghien avatar Mar 18 '22 08:03 hoangchunghien

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 avatar May 31 '22 09:05 danks-sayiqan

@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

Gallaecio avatar Dec 19 '22 12:12 Gallaecio