Javascript date comparison
Posted
by Art
on Stack Overflow
See other posts from Stack Overflow
or by Art
Published on 2010-05-22T16:22:49Z
Indexed on
2010/05/22
16:30 UTC
Read the original article
Hit count: 206
Why does equality operator return false in the first case?
var a = new Date(2010, 10, 10);
var b = new Date(2010, 10, 10);
alert(a == b); // <- returns false
alert(a.getTime() == b.getTime()); // returns true
Why?
© Stack Overflow or respective owner