rem: var stime = new Date(fields[1] + " " + fields[2]); var etime = new Date(fields[3] + " " + fields[4]);  exists = entryExists(stime, title);  calendarEvent = createEvent(); calendarEvent.id = createUniqueID( ); calendarEvent.title = title; calendarEvent.start.setTime(stime); calendarEvent.end.setTime(etime);  if ( !exists ) eventArray[ eventArray.length ] = calendarEvent; else dupArray[ dupArray.length ] = calendarEvent;   ++lineIndex; 
add:  var sdate = formater.parseShortDate(fields[1]+" "+fields[2]); var edate = formater.parseShortDate(fields[3]+" "+fields[4]); if ((sdate != null) && (edate != null)) { exists = entryExists(sdate, title); calendarEvent = createEvent(); calendarEvent.id = createUniqueID(); calendarEvent.title = title; calendarEvent.start.setTime(sdate); calendarEvent.end.setTime(edate); if ( !exists ) eventArray[ eventArray.length ] = calendarEvent; else dupArray[ dupArray.length ] = calendarEvent; } 
context: function parseOutlookCSVData( icalStr, discardDuplicates, promptEach ){  var lines = icalStr.split("\n");  var calendarEvent;  var eventArray = new Array();  var dupArray = new Array();  var lineIndex = 1;  var totalLines = lines.length-1;  var exists = false;  while (lineIndex < totalLines) {    var fields = lines[lineIndex].split('","');    fields[0] = fields[0].substring(1); // strip off the leading quote...    var title = fields[0];    var stime = new Date(fields[1] + " " + fields[2]);    var etime = new Date(fields[3] + " " + fields[4]);    exists = entryExists(stime, title);          calendarEvent = createEvent();    calendarEvent.id = createUniqueID( );    calendarEvent.title = title;    calendarEvent.start.setTime(stime);    calendarEvent.end.setTime(etime);    if ( !exists )      eventArray[ eventArray.length ] = calendarEvent;    else      dupArray[ dupArray.length ] = calendarEvent;    ++lineIndex;  }//   dump("*** calendar entries : " + eventArray.length + "\n");//   dump("*** duplicate entries: " + dupArray.length + "\n");  return { calendarEventArray: eventArray, calendarDuplicateArray: dupArray };}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/6f76675ee866f92055aed0490851bb2fe34d6bd6/importExport.js/buggy/calendar/resources/content/importExport.js