/** * Convenience method to pull the DTEND out of the property list. If DTEND was not specified, use the DTSTART + * DURATION to calculate it. * @param deriveFromDuration specifies whether to derive an end date from the event duration where an end date is * not found * @return The end for this VEVENT. */ public final DtEnd getEndDate(final boolean deriveFromDuration) { DtEnd dtEnd = (DtEnd) getProperty(Property.DTEND); // No DTEND? No problem, we'll use the DURATION. if (dtEnd == null && deriveFromDuration && getDuration() != null) { final DtStart dtStart = getStartDate(); final Duration vEventDuration = getDuration(); dtEnd = new DtEnd(Dates.getInstance(vEventDuration.getDuration() .getTime(dtStart.getDate()), (Value) dtStart .getParameter(Parameter.VALUE))); if (dtStart.isUtc()) { dtEnd.setUtc(true); } } return dtEnd; }
final DtStart dtStart = getStartDate(); final Duration vEventDuration; if (getDuration() != null) { vEventDuration = getDuration(); } else if (dtStart.getDate() instanceof DateTime) {
final DtStart dtStart = getStartDate(); final Duration vEventDuration; if (getDuration() != null) { vEventDuration = getDuration(); } else if (dtStart.getDate() instanceof DateTime) {
final DtStart dtStart = getStartDate(); final Duration vEventDuration; if (getDuration() != null) { vEventDuration = getDuration(); } else if (dtStart.getDate() instanceof DateTime) {
final DtStart dtStart = getStartDate(); final Duration vEventDuration; if (getDuration() != null) { vEventDuration = getDuration(); } else if (dtStart.getDate() instanceof DateTime) {