Set the array of holidays var holiday = array (' 2016-04-30 ', ' 2016-05-01 ', ' 2016-05-02 ', ' 2016-06-09 ', ' 2016-06-10 ', ' 2016-06-11 ', ' 2016-09-15 ', ' 2016-09-16 ', ' 2016-09-17 ', ' 2016-10-1 ', ' 2016-10-01 ', ' 2016-10-02 ', ' 2016-10-03 ', ' 2016-10-04 ', ' 2016-10-05 ', ' 2016-10-06 ', ' 2016-10-07 '); // Global Variables Var fiveday = array ();//used to save the date of the qualifying 5 days var Fiveweek = array ();//used to hold the qualifying 5 days of the week // Generate 5 Qualifying Dates function get_five_day () { var index = 0;//to mark the number of arrays already in the array for (var between=1;index<5;between++) { var date = new date ();//Date Object date.setdate (Date.getdate () +between); if (Date.getday () ==0 | | date.getday () ==6 ) continue; var year = date.getfullyear (); var month = date.getmonth (+1); month = month<10? ' 0 ' +month:month; var day = date.getdate (); day = day<10? ' 0 ' +day:day; var full_date = year+ '-' +month+ '-' +day; var flag = true; for (var i = 0;i
JQ Gets the date and day of the week except holidays and weeks 6th