wanasit / chrono

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

Information loss using timezone offset #532

Open emileindik opened 1 year ago

emileindik commented 1 year ago

After parsing an input, we receive the timezone offset number. Is there a way to receive the IANA, timezone name, or abbreviated timezone name that was found in the input?

For an input like 9pm EST I receive the timezone offset of -240. However, there are many IANA's that could fit that offset:

America/New_York
America/Montreal
America/Nassau
America/Port_of_Spain
...

The use case is that I'd like to reformat the input to a different arbitrary format. Like 9pm EST to 21:00 EST for example.

Thanks for this wonderful package!