function dateWithin(beginDate,endDate,checkDate) {
var b,e,c;
b = Date.parse(beginDate);
e = Date.parse(endDate);
c = Date.parse(checkDate);
if((c <= e && c >= b)) {
return true;
}
return false;
}
// This will alert 'false'
alert(dateWithin('12/20/2007 12:00:00 AM','12/20/2007 1:00:00 AM','12/19/2007 12:00:00 AM'));
Thanks
Happy Programming.
No comments:
Post a Comment