scrapinghub / dateparser

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

Enhancement: Let dateparser.parse take multiple strings to narrow down guesses #1167

Open bobinspace opened 1 year ago

bobinspace commented 1 year ago

Let's say we have 3 date strings, 2 of them with ambiguous format and the last with unambiguous format: 2015/1/1 2015/2/3 2015/31/12 If we can pass these 3 date strings into dateparser.parse altogether at once, then the first 2 date strings can be parsed confidently because of the strong hint from the 3rd date string. This will be very useful for guessing the format of date-like fields from csv files. Something like https://github.com/hi-primus/hi-dateinfer

Is this actually already achievable with the current dateparser?