code: function trimDates(start, stop, data) {
    var i, date;
    for( i = data.length-1; i >= 1; i-- ) {
      date = toDate(data[i][0]).getTime();
      if( start.getTime() > date || stop.getTime() < date ) {
        data.splice(i, 1);
      }
    }
  }
docs: var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];