rem: EndDate = new Date( MidnightSelectedDate.getTime() + ( 1000 * 60 * 60 * 24 ) - 1000 ); 
add: EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 ) - 1000 ); 
context: function refreshEventTree( eventArray ){   var savedThis = this;   var refreshListener = {       mEventArray: new Array(),       onOperationComplete: function (aCalendar, aStatus, aOperationType, aId, aDateTime) {           setTimeout(function () { refreshEventTreeInternal(refreshListener.mEventArray); }, 0);       },       onGetResult: function (aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {           for (var i = 0; i < aCount; i++) {               refreshListener.mEventArray.push(aItems[i]);           }       }   };   var Today = new Date();   //do this to allow all day events to show up all day long   var StartDate = new Date( Today.getFullYear(), Today.getMonth(), Today.getDate(), 0, 0, 0 );   var EndDate;   var ccalendar = getDisplayComposite();   var filter = 0;   filter |= ccalendar.ITEM_FILTER_TYPE_EVENT;   switch( document.getElementById( "event-filter-menulist" ).selectedItem.value )   {      case "all":         StartDate = null;         EndDate = null;         break;               case "today":         EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 ) - 1 );         break;               case "next7Days":         EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 * 8 ) );         break;               case "next14Days":         EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 * 15 ) );         break;               case "next31Days":         EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 * 32 ) );         break;               case "thisCalendarMonth":         // midnight on first day of this month         var startOfMonth = new Date( Today.getFullYear(), Today.getMonth(), 1, 0, 0, 0 );         // midnight on first day of next month         var startOfNextMonth = new Date( Today.getFullYear(), (Today.getMonth() + 1), 1, 0, 0, 0 );         // 23:59:59 on last day of this month         EndDate = new Date( startOfNextMonth.getTime() - 1000 );         StartDate = startOfMonth;         break;      case "future":         EndDate = null;         break;      case "current":         var SelectedDate = gCalendarWindow.getSelectedDate();         StartDate = new Date( SelectedDate.getFullYear(), SelectedDate.getMonth(), SelectedDate.getDate(), 0, 0, 0 );         EndDate = new Date( MidnightSelectedDate.getTime() + ( 1000 * 60 * 60 * 24 ) - 1000 );         break;            default:          dump( "there's no case for "+document.getElementById( "event-filter-menulist" ).selectedItem.value+"\n" );         EndDate = StartDate;         break;   }   var s = StartDate ? jsDateToDateTime(StartDate) : null;   var e = EndDate ? jsDateToDateTime(EndDate) : null;   if (StartDate && EndDate) {       filter |= ccalendar.ITEM_FILTER_CLASS_OCCURRENCES;   }   ccalendar.getItems (filter, 0, s, e, refreshListener);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/b3e98ffffdfd2bcd1f4281756a92584053153f17/unifinder.js/clean/calendar/resources/content/unifinder.js