jQuery Calculate Date
<p>Any reason why this is landing on the wrong day?</p>

<p><a href="http://jsfiddle.net/SparrwHawk/MH5wP/" rel="nofollow">http://jsfiddle.net/SparrwHawk/MH5wP/</a></p>

<p>I've written the code below for reference, but it's obviously clearer on jsfiddle</p>

<pre><code>&lt;p&gt;Sun / Closed&lt;/p&gt;
&lt;p&gt;Mon / Closed&lt;/p&gt;
&lt;p&gt;Tues / 9am – 5pm&lt;/p&gt;
&lt;p&gt;Wed / 9am – 5pm&lt;/p&gt;
&lt;p&gt;Thurs / 9am – 8pm&lt;/p&gt;
&lt;p&gt;Fri / 9.30pm – 6.30pm&lt;/p&gt;
&lt;p&gt;Sat / 8.30am – 4.30pm&lt;/p&gt;

&lt;script&gt;
// Day where 0 is Sunday
var date = new Date();
var d = (date.getDay());

$(function(){
    if (d = 1) {
        $('p:contains("Mon")').addClass('today');
    } else if (d = 2) {
        $('p:contains("Tues")').addClass('today');
    } else if (d = 3) {
        $('p:contains("Wed")').addClass('today');
    } else if (d = 4) {
        $('p:contains("Thurs")').addClass('today');
    } else if (d = 5) {
        $('p:contains("Fri")').addClass('today');
    } else if (d = 6) {
        $('p:contains("Sat")').addClass('today');
    } else {
        $('p:contains("Sun")').addClass('today');
    }    
});
&lt;/script&gt;
</code></pre>
