<div dir="ltr">Dont use now() for dates. os:timestamp() is what you should use.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 10, 2013 at 10:27 PM, Bob Ippolito <span dir="ltr"><<a href="mailto:bob@redivi.com" target="_blank">bob@redivi.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sounds like you should try and find an interval tree implementation for Erlang, one probably exists somewhere by now. The fact that you're working with times is basically irrelevant to the actual problem at hand.</div>
<div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 10, 2013 at 12:34 PM, Mark Allen <span dir="ltr"><<a href="mailto:mallen@alertlogic.com" target="_blank">mallen@alertlogic.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">At $DAYJOB, my team is working on a project where we need to compute a time range (like 9am to 9pm in a specified timezone) and see if erlang:now() is in that time range and take a different action if the bool is true or false.<br>
<br>
Are there any good libraries for working with time ranges like this? I wanted to ask before we re-invent the wheel. I didn't find anything especially appropriate on a cursory web search.<br>
<br>
Thanks.<br>
<br>
Mark<br>
<br>
Mark Allen<br>
Sr Software Developer<br>
Alert Logic<br>
<br>
E: <a href="mailto:mallen@alertlogic.com" target="_blank">mallen@alertlogic.com</a><br>
<br>
<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>