add:      if (!this.endDate.isValid) { this.endDate = this.startDate.clone(); if (this.startDate.isDate) { this.endDate.day += 1; this.endDate.normalize(); } }  
context:     set icalComponent(event) {        this.modify();        if (event.componentType != "VEVENT") {            event = event.getFirstSubcomponent("VEVENT");            if (!event)                throw Components.results.NS_ERROR_INVALID_ARG;        }        this.setItemBaseFromICS(event);        this.mapPropsFromICS(event, this.icsEventPropMap);        this.importUnpromotedProperties(event, this.eventPromotedProps);                // If there is a duration set on the event, calculate the right        // end time.        // XXX This means that serializing later will loose the duration        //     information, to replace it with a dtend. bug 317786        if (event.duration) {            this.endDate = this.startDate.clone();            this.endDate.addDuration(event.duration);        }                // Importing didn't really change anything        this.mDirty = false;    },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/c0d780179a31e5f883ad078f3ccd2d8967bb694f/calEvent.js/clean/calendar/base/src/calEvent.js