uutils / parse_datetime

Parses a relative time string and returns a `Duration`
MIT License
15 stars 20 forks source link

Funny parsing results #84

Open xeruf opened 4 weeks ago

xeruf commented 4 weeks ago

Wrote a small helper to compare to chrono-english. Apart from #23 and #83, I found some other small issues:

image

xeruf commented 4 weeks ago

@conradludgate might also be interesting for your fork https://github.com/conradludgate/interim, which will be my preferred parser with fallback to this one, because each handles some relative times better:

image

image

Irrelevant sidenote: Only chrono-english understands 1se and 1M.

xeruf commented 4 weeks ago

with years business gets funny: image

conradludgate commented 4 weeks ago

For interim, I intended to keep all the quirks of chrono-english for compatibility, but with less panics. I'll admit I haven't given too much thought to the actual cases. I'm open to adding new features if desired

xeruf commented 4 weeks ago

@conradludgate that would be great, if you could add these I could fully rely on interim: https://github.com/conradludgate/interim/issues/7

sylvestre commented 1 week ago

@xeruf you could please replace your screenshots by text? They are terrible for search, reproducibility and accessibility