While working with Date objects, I encountered something peculiar. When comparing two Date objects - let's call them a
and b
, the expressions a > b
and b < a
yield different results.
Check out this JSFiddle for an example.
var u = Date(2014,7,5,14,00);
var k = Date(2014,7,5,13,50);
alert(" this is " + k<u);
alert(" this is " + u>k);
I'm trying to figure out what I might be missing here. Any insights?