lib/recurrify.js
/**
   * Updates the set of cached ranges to the next valid ranges. Only
   * recurrences where the current start date is less than or equal to the
   * specified startDate need to be updated.
   *
   * @param {String} dir: The direction to use, either 'next' or 'prev'
   * @param {Array} schedArr: The set of compiled recurrences to use
   * @param {Array} startsArr: The set of cached start dates for the recurrences
   * @param {Date} startDate: Starts earlier than this date will be calculated
   */
Updates the set of cached ranges to the next valid ranges. Only
recurrences where the current start date is less than or equal to the
specified startDate need to be updated.

@param {String} dir: The direction to use, either 'next' or 'prev'
@param {Array} schedArr: The set of compiled recurrences to use
@param {Array} startsArr: The set of cached start dates for the recurrences
@param {Date} startDate: Starts earlier than this date will be calculated
Updates the set of cached ranges to the next valid ranges . Only recurrences where the current start date is less than or equal to the specified startDate need to be updated . @param { String } dir : The direction to use either ' next ' or ' prev ' @param { Array } schedArr : The set of compiled recurrences to use @param { Array } startsArr : The set of cached start dates for the recurrences @param { Date } startDate : Starts earlier than this date will be calculated
function updateRangeStarts (dir, schedArr, rangesArr, startDate) {
    var compare = compareFn(dir)
    for (var i = 0, len = schedArr.length; i < len; i++) {
      if (rangesArr[i] && !compare(rangesArr[i][0], startDate)) {
        var nextStart = schedArr[i].start(dir, startDate)
        if (!nextStart) {
          rangesArr[i] = recurrify.NEVER
        } else {
          rangesArr[i] = [nextStart, schedArr[i].end(dir, nextStart)]
        }
      }
    }
  }
function updateRangeStarts ( dir , schedArr , rangesArr , startDate ) { var compare = compareFn ( dir ) for ( var i = 0 , len = schedArr . length ; i < len ; i ++ ) { if ( rangesArr [ i ] && ! compare ( rangesArr [ i ] [ 0 ] , startDate ) ) { var nextStart = schedArr [ i ] . start ( dir , startDate ) if ( ! nextStart ) { rangesArr [ i ] = recurrify . NEVER } else { rangesArr [ i ] = [ nextStart , schedArr [ i ] . end ( dir , nextStart ) ] } } } }
Updates the set of cached ranges to the next valid ranges.
Updates the set of cached ranges to the next valid ranges .