javascript – count if there are dates in array that match condition

function calculate() { var day = document.first.len11c.value; var mon = document.first.len12c.value; var year = document.first.len13c.value; var ylen = year.length; var m = new Array(“Jan”, “Feb”, “March”, “April”, “May”, “June”, “July”, “Aug”, “Sept”, “Oct”, “Nov”, “Dec”); var curd = new Date(year, mon – 1, day); var res2 = curd.getMonth(); var res = new Date(); var diff … Read more