Run logic on same date only
<p>I have a situation where my logic is comparing my column 0 (list of time) to a 24hour javascript clock, and returns a stoplight color scheme on the row depending on how close the times are. </p>

<p>The issue is when its 23:00(11pm) and there is a item in my time column that read "2:10am"(next day) my logic thinks its a late time, and does not recognize it's tomorrow's item. my color coding logic works but I only need this to execute if cell[0] date is equal to the system date(js clock).</p>

<pre><code>    //date time object 
        var t = new Date();

    // loops through each row
        for (i = 0; i &lt; rows.length; i++) {
        cells = rows[i].getElementsByTagName('td');

        //configures the clock
        var hm = cells[0].innerText.split(":");
        t.setHours(hm[0], hm[1], 0, 0);
        var r = (t.getTime() - currentTime.getTime()) / 1000 / 60 / 60;

        //logic  executed

             if (r &lt;= 0.25 &amp;&amp; cells[1].innerText == false)
                rows[i].className = "ewTableRowConditionalRed";

            else if (r &gt; 0.25 &amp; r &lt;= 0.5 &amp;&amp; cells[1].innerText == false)
                rows[i].className = "ewTableRowConditionalYellow";

            else if (r &gt; 0.5 &amp; r &lt;= 2 &amp;&amp; cells[1].innerText == false)
                rows[i].className = "ewTableRowConditionalGreen";

    }
</code></pre>
