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’


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

Share This Post

Related Articles

© 2017 Sumit Bansal. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie