Re:Show HN: Natural Language Time Zone Converter
by hpoydar on Thursday October 29, 2015 @12:23PM
(#10472235)
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.
[ Parent
| on HN ]
Re:Show HN: Natural Language Time Zone Converter
by digital_ins on Friday October 30, 2015 @09:35AM
(#10477656)
hahaha, 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.