As simple as this is I appear to be missing something in understanding the Date() object or im just too tired to see something obvious. Why does this javascript report the month wrong? (It will report the month as July instead of June as written.)
<script>
var x = new Date(2013,6,27,0,0,0,0);
var today = new Date();
if (x>today)
{
alert("Today is before " + x);
}
else
{
alert("Today is after " + x);
}
</script>