rem:   var probeTime = now.getTime() - dur; isValid = calendarEvent.getNextRecurrence(probeTime, result); 
add:   var probeTime = now(); probeTime.addDuration(dur);   var occtime = calendarEvent.recurrenceInfo.getNextOccurrenceDate(probeTime); 
context: function getCurrentNextOrPreviousRecurrence(calendarEvent){    var isValid = false;    var eventStartDate;    if (calendarEvent.recur) {        var now = new Date();        var result = new Object();        var dur = calendarEvent.endDate.jsDate - calendarEvent.startDate.jsDate;        // To find current event when now is during event, look for occurrence        // starting duration ago.        var probeTime = now.getTime() - dur;        isValid = calendarEvent.getNextRecurrence(probeTime, result);        if (isValid) {            eventStartDate = new Date(result.value);        } else {            isValid = calendarEvent.getPreviousOccurrence(probeTime, result);            if (isValid) {                eventStartDate = new Date(result.value);            }        }    }       if (!isValid) {        eventStartDate = new Date( calendarEvent.startDate.jsDate );    }          return eventStartDate;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/02cf6aab183134360005f2a87a5c50f6d109a102/calendarUtils.js/clean/calendar/resources/content/calendarUtils.js