/** * Applies BYSECOND rules specified in this Recur instance to the specified date list. If no BYSECOND rules are * specified the date list is returned unmodified. * @param dates * @return */ private DateList getSecondVariants(final DateList dates) { if (getSecondList().isEmpty()) { return dates; } final DateList secondlyDates = getDateListInstance(dates); for (final Iterator i = dates.iterator(); i.hasNext();) { final Date date = (Date) i.next(); final Calendar cal = getCalendarInstance(date, true); for (final Iterator j = getSecondList().iterator(); j.hasNext();) { final Integer second = (Integer) j.next(); cal.set(Calendar.SECOND, second.intValue()); secondlyDates.add(Dates.getInstance(cal.getTime(), secondlyDates.getType())); } } return secondlyDates; }
/** * Applies BYSECOND rules specified in this Recur instance to the specified date list. If no BYSECOND rules are * specified the date list is returned unmodified. * * @param dates * @return */ private DateList getSecondVariants(final DateList dates) { if (getSecondList().isEmpty()) { return dates; } final DateList secondlyDates = getDateListInstance(dates); for (final Date date : dates) { final Calendar cal = getCalendarInstance(date, true); for (final Integer second : getSecondList()) { cal.set(Calendar.SECOND, second); secondlyDates.add(Dates.getInstance(cal.getTime(), secondlyDates.getType())); } } return secondlyDates; }
/** * Applies BYSECOND rules specified in this Recur instance to the specified date list. If no BYSECOND rules are * specified the date list is returned unmodified. * * @param dates * @return */ private DateList getSecondVariants(final DateList dates) { if (getSecondList().isEmpty()) { return dates; } final DateList secondlyDates = getDateListInstance(dates); for (final Date date : dates) { final Calendar cal = getCalendarInstance(date, true); for (final Integer second : getSecondList()) { cal.set(Calendar.SECOND, second); secondlyDates.add(Dates.getInstance(cal.getTime(), secondlyDates.getType())); } } return secondlyDates; }
b.append(minuteList); if (!getSecondList().isEmpty()) { b.append(';'); b.append(BYSECOND);
b.append(minuteList); if (!getSecondList().isEmpty()) { b.append(';'); b.append(BYSECOND);
b.append(minuteList); if (!getSecondList().isEmpty()) { b.append(';'); b.append(BYSECOND);
rrc.setBySecond(checkNumList(recur.getSecondList())); rrc.setByMinute(checkNumList(recur.getMinuteList())); rrc.setByHour(checkNumList(recur.getHourList()));
outField(jgen, "byhour", r.getHourList()); outField(jgen, "byminute", r.getMinuteList()); outField(jgen, "bysecond", r.getSecondList()); outField(jgen, "bysetpos", r.getSetPosList());
xmlProp(xml, XcalTags.byhour, r.getHourList()); xmlProp(xml, XcalTags.byminute, r.getMinuteList()); xmlProp(xml, XcalTags.bysecond, r.getSecondList()); xmlProp(xml, XcalTags.bysetpos, r.getSetPosList());