4 ms·
Ask HN: How to write a natural language date time parser?
- mryan 11y agoPython's parsedatetime module can do some level of language parsing. https://github.com/bear/parsedatetime https://github.com/bear/parsedatetime Examples: next thursday at 4pm at 4pm 2 hours before noon 2 days from tomorrow
- stray 11y agoHave a look at these: - https://gist.github.com/akatzbreaker/5849024 https://gist.github.com/akatzbreaker/5849024 - https://github.com/chesles/naturaltime https://github.com/chesles/naturaltime - https://github.com/kvh/recurrent https://github.com/kvh/recurrent - https://github.com/bear/parsedatetime https://github.com/bear/parsedatetime - https://github.com/Carbon/Language https://github.com/Carbon/Language
- libx 11y agoYou can check Rebol http://www.rebol.com/ http://www.rebol.com/ and the new Red http://www.red-lang.org/ http://www.red-lang.org/ programming languages. The latter one not yet production ready. In Rebol (and Red) you can just do the following: print 3:30am + 00:07:19 ; increment time values properly Note that ';' is the identifier for a comment.