4 ms·
Thanks! We actually started with NLP libraries, but fell back on plain old regex, which in the end was the right tool for the job, though it got a bit hairy. (N
by hpoydar 11y ago
Thanks! We actually started with NLP libraries, but fell back on plain old regex, which in the end was the right tool for the job, though it got a bit hairy. (Nice to hear from someone who can appreciate it.) As for daylight savings, we use the browser to get a current GMT offset on your first request and determine an Olson TZ, which we cookie. Subsequent requests are passed off to a Node instance for processing along with the time zone, which also processes posts from Slack and HipChat. And yes, MomentJS and Moment Timezone are the workhorses here.
- digital_ins 11y agohahaha, yeah, good ol' getTimeZoneOffset() being put to work. It's shocking how crappy JS' date object is, it's near impossible to do anything powerful with it without resorting to obnoxiously-structured regex. Once again - great job! I'm building complex conversational interfaces and even I think that this really is something.