Hacker News new | ask | show | jobs
Ask HN: How to write a natural language date time parser?
1 points by tacticiankerala 3977 days ago
3 comments

You can check Rebol http://www.rebol.com/ and the new Red 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.

Python's parsedatetime module can do some level of language parsing.

https://github.com/bear/parsedatetime

Examples:

next thursday at 4pm

at 4pm

2 hours before noon

2 days from tomorrow