rem: var startDate = gCalendarWindow.currentView.getNewEventDate();  var Minutes = Math.ceil( startDate.getMinutes() / 5 ) * 5 ;  startDate = new Date( startDate.getFullYear(), startDate.getMonth(), startDate.getDate(), startDate.getHours(), Minutes, 0);  calendarToDo.start.setTime( startDate );  var MinutesToAddOn = getIntPref(gCalendarWindow.calendarPreferences.calendarPref, "event.defaultlength", gCalendarBundle.getString("defaultEventLength" ) );  var dueDateTime = startDate.getTime() + ( 1000 * 60 * MinutesToAddOn );  calendarToDo.due.setTime( dueDateTime ); 
add:  calendarToDo.start.setTime( k_NO_DATE ); calendarToDo.due.setTime( k_NO_DATE ); 
context: function newToDoCommand(){    var calendarToDo = createToDo();    var startDate = gCalendarWindow.currentView.getNewEventDate();       var Minutes = Math.ceil( startDate.getMinutes() / 5 ) * 5 ;       startDate = new Date( startDate.getFullYear(),                       startDate.getMonth(),                       startDate.getDate(),                       startDate.getHours(),                       Minutes,                       0);    calendarToDo.start.setTime( startDate );       var MinutesToAddOn = getIntPref(gCalendarWindow.calendarPreferences.calendarPref, "event.defaultlength", gCalendarBundle.getString("defaultEventLength" ) );    var dueDateTime = startDate.getTime() + ( 1000 * 60 * MinutesToAddOn );    calendarToDo.due.setTime( dueDateTime );    var args = new Object();    args.mode = "new";    args.onOk =  self.addToDoDialogResponse;    args.calendarEvent = calendarToDo;    window.setCursor( "wait" );    // open the dialog modally    openDialog("chrome://calendar/content/toDoDialog.xul", "caEditEvent", "chrome,modal", args );}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c3ec316be4f0179deedde2ddb63be19899f3b5de/calendar.js/buggy/calendar/resources/content/calendar.js