Closed titaniumbones closed 5 years ago
The chrono js library looks promising for this: https://github.com/wanasit/chrono
There are also some examples of datetime parsing in other hubot scripts, but they're a little hard to read.
In any case the ain work would be to update the robot respond regex. I think if we were doing NL parsing then we'd actually simplify the regex to something like /"zoom me ( .*)/i
and then submit msg.match[1]
to some more complex parsing. chrono can help with this I think, or we could just be quite rigorous in our requirements & write a more helpful help message. (note: it's now recommended to name the callback parameter 'res' for semantic reasons).
THis is now operational. Relieso n moment.js as well as chrono-node. Currently feels a little inefficient but procesisng power is not really an issue here for this very low-use tool.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in seven days if no further activity occurs. If it should not be closed, please comment! Thank you for your contributions.
It would be really helpful to be able to add a date to a halpy zoom creation command. Right now hte usefulness of hte script is limited.