wanasit / chrono

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

Allow "a" and "p" for "am" and "pm" #451

Open thatericsmith opened 2 years ago

thatericsmith commented 2 years ago

I see in the code where it says this situation is perhaps unlikely: https://github.com/wanasit/chrono/blob/master/src/common/parsers/AbstractTimeExpressionParser.ts#L325

Our users, on the other hand, use this shorthand quite frequently. Could this possibly be added using a flag / config option?

Thanks for considering!

zekecato commented 2 years ago

I'd also like this feature. This is how time tracking interprets time in Quickbooks Self-Employed, and I'm used to it. I'm just exploring using this library, and if anyone could give guidance on how to add a parser or refiner to override this behavior, I'd appreciate that.