How to check date if date is between two date

This function the return the true and false if date is exist or not exist.

function dateWithin(StartDate,EndDate,CheckDate) {
var b,e,c;
s = Date.parse(StartDate);
e = Date.parse(EndDate);
c = Date.parse(CheckDate);
if((c <= e && c >= s)) {
return true;
return false;

// This will alert ‘false’


Bansal Sumit

To seek challenging roles and to achieve excellence in the field of Open Source Web Technology with a profound spirit of commitment and dedication.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *