code: function dateFromArray(input, asUTC, hoursOffset, minutesOffset) {
          var i, date, forValid = [];
          for (i = 0; i < 7; i++) {
              forValid[i] = input[i] = (input[i] == null) ? (i === 2 ? 1 : 0) : input[i];
          }
          // we store whether we used utc or not in the input array
          input[7] = forValid[7] = asUTC;
          // if the parser flagged the input as invalid, we pass the value along
          if (input[8] != null) {
              forValid[8] = input[8];
          }
          // add the offsets to the time to be parsed so that we can have a clean array
          // for checking isValid
          input[3] += hoursOffset || 0;
          input[4] += minutesOffset || 0;
          date = new Date(0);
          if (asUTC) {
              date.setUTCFullYear(input[0], input[1], input[2]);
              date.setUTCHours(input[3], input[4], input[5], input[6]);
          } else {
              date.setFullYear(input[0], input[1], input[2]);
              date.setHours(input[3], input[4], input[5], input[6]);
          }
          date._a = forValid;
          return date;
      }
docs: convert an array to a date. the array should mirror the parameters below note: all values past the year are optional and will default to the lowest possible value. [year, month, day , hour, minute, second, millisecond]