how to know date is today?
<p>I am trying this but is not working... why?</p>

<pre><code>&lt;html&gt;
&lt;body&gt;
&lt;script type="text/javascript"&gt;

var today=new Date(); //today is Nov 28, 2010
today.setHours(0);
today.setMinutes(0);
today.setSeconds(0);
document.write(today+" ");

var today2 = new Date("November 28, 2010");
document.write(today2 + " ");
if (today == today2) { document.write("==");
if (!(today &gt; today2) &amp;&amp; !(today &lt; today2) ) {document.write("==  ");}
if (today &gt; today2) { document.write("&gt;  ");}
if (today &gt;= today2 ){ document.write("&gt;=  ");}
if (today &lt; today2 ) { document.write("&lt;  ");}
if (today &lt;= today2 ){ document.write("&lt;=  ");}

&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>And I always get this:</p>

<pre><code>Sun Nov 28 2010 00:00:00 GMT+0900 (JST) Sun Nov 28 2010 00:00:00 GMT+0900 (JST) &gt; &gt;=
</code></pre>

<p>Aren't both dates to be the same? hence I should get == printed but is not happening... ;(
Thank you for your help in advance.</p>
