wanasit / chrono

A natural language date parser in Javascript
MIT License
4.61k stars 339 forks source link

What is necessary for full support? #436

Closed georgd closed 2 years ago

georgd commented 2 years ago

de is marked as partially supported. What are the required parts for full support?

wanasit commented 2 years ago

There is no clear boundary between "full" and "partial" (and all locales are actually behind English), but I think the most important difference is recognizing data/time reference in addition to the normal date/time.

for example, in English, you could do:

// Normal date/time
chrono.en.parseDate("2022-02-22") // OK
chrono.en.parseDate("Tueday 2pm") // OK

// Reference 
chrono.en.parseDate("in 2 hour 4 minute") // OK
chrono.en.parseDate("three days ago") // OK

In DE:

chrono.de.parseDate("12. Juli um 19 Uhr") // OK
chrono.de.parseDate("an 2 tag") // Not, support
georgd commented 2 years ago

Thank you. I think, I have identified what is missing, by comparing with the English and French localisations. My JS knowledge is not the best but the English and French localisations contain everything which I need to complete the DE localisation (once the test issue is fixed, which currently blocks my contributions).