scrapinghub / dateparser

python parser for human readable dates
BSD 3-Clause "New" or "Revised" License
2.55k stars 465 forks source link

Problem in Bahasa Indonesia (ID) #398

Closed feryandi closed 1 year ago

feryandi commented 6 years ago

I could not parse this string: "Minggu, 18 Mar 2018 07:30" Which is basic Indonesia and linearly translate to English as "Sunday, 18 Mar 2018 07:30"

Here's my code:

import dateparser
print(dateparser.parse(u'Minggu, 18 Mar 2018 07:30'))

Interestinglly, "Senin, 18 Mar 2018 07:30" could be parsed correctly. (English: "Monday, 18 Mar 2018 07:30")

Further investigation leads to the incorrect translation from Indonesia to English, week in Indonesia is minggu, same as sunday is minggu, so the minggu in the date translated into week which does not make sense in English thus returning invalid date.

Gallaecio commented 1 year ago

Fixed by https://github.com/scrapinghub/dateparser/pull/1134