wanasit / chrono

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

Handle input locale #515

Closed zzph closed 1 year ago

zzph commented 1 year ago

Hiya,

Firstly, awesome work on this one!

I've found an issue when passing in the input locale.

This works fine, but the date is wrong (as we need to define the local for DD/MM/YY)

chrono.parseDate("07/05/2023.");

RESULT = 2023-05-07T0 ... (wrong date LOCALE)

Using the local is null

chrono.en.GB.parseDate("07/05/2023.");

RESULT = null