Swap div visibility based on time / schedule
<p>On my page I have two divs... one div I'd like to be visible from 10am to 6pm ( server time ).... and the other div for the remaining hours.  </p>

<p>I tried a bunch of searches to find some sort of a javascript or jquery content swapper without any luck.. thanks for any suggestions? </p>

<pre><code>&lt;div id="day"&gt;content&lt;/div&gt;

&lt;div id="night"&gt;content&lt;/div&gt;
</code></pre>

<p>I was able to get this working using only the following php: </p>

<pre><code>&lt;?php
$hour = strftime("%H");
if ($hour &gt;= 02 &amp;&amp; $hour &lt; 05)
{
echo '&lt;div id="div1"&gt;content block one &lt;/div&gt;';
}
else
{
    echo '&lt;div id="div2"&gt;content block two&lt;/div&gt;';
}?&gt;
</code></pre>

<p>However this solution doesn't seem to work if I want to show the div from 8pm until 4am...   is this because it is spanning more than one day? Thanks for any suggestions.</p>
