joestelmach / natty

Java natural language date parser
http://natty.joestelmach.com/
MIT License
520 stars 183 forks source link

German Dates Like 07.10.2011 #20

Open prsebastian opened 12 years ago

prsebastian commented 12 years ago

Hi,

it would be great if natty would parse german dates too. A german date has the form dd.mm.yyyy or dd.mm.yy or sometimes d.mm.yy(yy)

Over 20 countries use this date format too, please refer to http://en.wikipedia.org/wiki/Date_format_by_country

Thanks in advance, Sebastian

katyaa commented 10 years ago

I have recently had to modify natty to parse german dates and I can tell you that natty cannot parse both. There is too much ambiguity. Even java method DateFormat.getDateInstance(DateFormat.SHORT).parse(string) will fail to parse, depending on which Locale you're in. In US it fails to parse dot separated dates, in GERMANY it fails to parse slash separated dates.