JQ gets date and week except Holidays and week 6th outside

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.