   function convertDate(date) { if (!date) return null; if (date.isDate) { var newDate = date.clone(); newDate.hour = 0; newDate.minute = 0; newDate.second = 0; newDate.isDate = false; return newDate; } else { return date; } } 
var entry = ensureDateTime(this.entryDate); var due = ensureDateTime(this.dueDate); 
    getOccurrencesBetween: function(aStartDate, aEndDate, aCount) {        if (this.recurrenceInfo) {            return this.recurrenceInfo.getOccurrences(aStartDate, aEndDate, 0, aCount);        }        if (!this.entryDate && !this.dueDate)            return null;        // We need to convert dates to regular datetime-objects        // here in order to correctly handle allday-todos that        // don't match day borders.        function convertDate(date) {          if (!date)            return null;          if (date.isDate) {            var newDate = date.clone();            newDate.hour = 0;            newDate.minute = 0;            newDate.second = 0;            newDate.isDate = false;            return newDate;          } else {            return date;          }        }        var entry = convertDate(this.entryDate);        var due = convertDate(this.dueDate);        var queryStart = convertDate(aStartDate);        var queryEnd = convertDate(aEndDate);        var isInterval = entry && due;        var isZeroLength = isInterval ? !entry.compare(due) : true;        var dateTime = entry ? entry : due;                if ((isZeroLength &&             dateTime.compare(queryStart) >= 0 &&             dateTime.compare(queryEnd) < 0) ||            (!isZeroLength &&             entry.compare(queryEnd) < 0 &&             due.compare(queryStart) > 0)) {                      aCount.value = 1;          return ([ this ]);        }        aCount.value = 0;        return null;    },
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/5840ed4834ab82bea4f6597247325520ead95056/calTodo.js/buggy/calendar/base/src/calTodo.js