You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've never been too familiar with parsers or lexers, and while I'm very happy this crate exists, I have run into some issues with parsing, most lately, e.g. <week-day> 12pm
This simply returns "bad date".
I also wonder if there's a way to leverage the lexing and etc work done in coreutils.
Ah, a yacc grammar! When I was first wondering how date did its magic, I looked for a formal specification. So this crate makes it up. I think we can tighten things up a lot, and produce better error messages (for me bringing in a grammar would be a nuclear option, only if we cannot resolve issues. But it is a useful reference)
It seems Coreutils has a very nice implementation of this that works super reliably?
https://github.com/coreutils/gnulib/blob/master/lib/parse-datetime.y
The text was updated successfully, but these errors were encountered: