I have this code:
var d1 = new Date(Date.UTC(2011, 0, 1));
var d2 = new Date(Date.UTC(2011, 0, 1));
if (d1 == d2) { alert('Equals1'); }
if (d1 === d2) { alert('Equals2'); }
if (d1 < d2) { alert('d1 < d2'); }
if (d1 > d2) { alert('d1 > d2'); }
Could someone tell me WHY I can't comparing these two dates? You can run the script here: http://jsfiddle.net/vSL47/
These two dates should be equals, no?
Thanks