Find Second and Fourth Saturday for the selected month and year using this javascript.
Features
Use this java script to find second and fourth saturday of particular month and year.
This code supports all browsers.
Preview
Downloads
Javascript
<!-- Script by hscripts.com --> <script type="text/javascript"> function calculate() { var mon=document.getElementById('month').value; var yea=document.getElementById('year').value; var dat=1; myDays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"] myDate=new Date(eval('"'+dat+','+mon+','+yea +'"')) var first=myDays[myDate.getDay()]; var secnd; var forth; switch(first) {case "Sunday":secnd = "14th,"+mon+','+yea;forth = "28th,"+mon+','+yea;break;case "Monday":secnd = "13th,"+mon+','+yea;forth = "27th,"+mon+','+yea; break;case "Tuesday": secnd ="12th,"+mon+','+yea;forth = "26th,"+mon+','+yea;break;case "Wednesday":secnd = "11th,"+mon+','+yea;forth = "25th,"+mon+','+yea; break;case "Thursday":secnd = "10th,"+mon+','+yea;forth = "24th,"+mon+','+yea;break;case "Friday":secnd = "9th,"+mon+','+yea;forth = "23rd,"+mon+','+yea;break;case "Saturday":secnd = "8th,"+mon+','+yea;forth = "22nd,"+mon+','+yea;break;default:break; } document.getElementById('secsat').value = secnd; document.getElementById('foursat').value = forth; } function ctck() {var sds = document.getElementById("dum");if(sds == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");}var sdss = document.getElementById("dumdiv");if(sdss == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");} } document.onload ="ctck()"; </script>