Bind a event listener to a submit form between a specific date and time in JavaScript
<p>I want to popup a message when user click on submit button between the date of 2012-01-22, 00:00 to 2012-01-25, 23:59. I write the code as below, but it won't works. Could someone suggest how to convert the date to integer so that I can check if today date is greater than x and less than x, then popup the message?</p>

<p>Thanks</p>

<pre><code>function holiday_alert_msg() {      
    var today_date = new Date();

    if (today_date &gt; 201201220000 &amp;&amp; today_date &lt; 201201252359) {
        alert("Today is holiday");
    }

}

$('#submit').bind('click', function() {
    holiday_alert_msg();
});
</code></pre>
