rem: recRule.endDate = jsDateToDateTime(getElementValue("repeat-until-date")); 
add:   var endDate = getElementValue("repeat-until-date") endDate.setHours(23); endDate.setMinutes(59); endDate.setSeconds(59); endDate.setMilliseconds(999); endDate = jsDateToDateTime(endDate); endDate.normalize(); recRule.endDate = endDate; 
context: function saveDialog(){    // This works, but if we ever support more complex recurrence,    // e.g. recurrence for Martians, then we're going to want to    // not clone and just recreate the recurrenceInfo each time.    // The reason is that the order of items (rules/dates/datesets)    // matters, so we can't always just append at the end.  This    // code here always inserts a rule first, because all our    // exceptions should come afterward.    var deckNumber = Number(getElementValue("period-list"));        var recurrenceInfo = null;    if (window.originalRecurrenceInfo) {        recurrenceInfo = window.originalRecurrenceInfo.clone();        var rrules = splitRecurrenceRules(recurrenceInfo);        if (rrules[0].length > 0)            recurrenceInfo.deleteRecurrenceItem(rrules[0][0]);    } else {        recurrenceInfo = createRecurrenceInfo();        recurrenceInfo.item = window.calendarEvent;    }    var recRule = new calRecurrenceRule();    switch (deckNumber) {    case 0:        recRule.type = "DAILY";        var ndays = Number(getElementValue("daily-days"));        recRule.interval = ndays;        break;    case 1:        recRule.type = "WEEKLY";        recRule.interval = 1; // XXX we need to support every 2 weeks and so on..        var onDays = [];        ["sun", "mon", "tue", "wed", "thu", "fri", "sat"].            forEach(function(d)                    {                        var elem = document.getElementById("weekly-" + d);                         if (elem.checked) {                            onDays.push(elem.getAttribute("value"));                        }                    });        if (onDays.length > 0)            recRule.setComponent("BYDAY", onDays.length, onDays);        break;    case 2:        recRule.type = "MONTHLY";        break;    case 3:        recRule.type = "YEARLY";        var nyears = Number(getElementValue("yearly-years"));        if (nyears == "")            nyears = 1;        recRule.interval = nyears;        break;    }    /* figure out how long this event is supposed to last */    switch(document.getElementById("recurrence-duration").selectedItem.value) {    case "forever":        recRule.count = -1;        break;    case "ntimes":        recRule.count = Math.max(1, getElementValue("repeat-ntimes-count"));        break;    case "until":        recRule.endDate = jsDateToDateTime(getElementValue("repeat-until-date"));        break;    }    recurrenceInfo.insertRecurrenceItemAt(recRule, 0);    for each (date in window.removedExceptions) {        recurrenceInfo.restoreOccurrenceAt(date);    }    return recurrenceInfo;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ca81479a70bc2ccf0d841215f32b50d2d59fd0f4/calendar-recurrence-dialog.js/buggy/calendar/base/content/calendar-recurrence-dialog.js