What's wrong with this code?
function test() {
var start = new Date(2012, 3, 31, 19, 0, 0); // Start: 3/31/2012 7:00 PM
var end = new Date(2012, 4, 1, 1, 0, 0); // End: 4/01/2012 1:00 AM
if (end < start)
console.log("oops!");
else
console.log("works!");
}
Result:
oops!