Examples of RRule


Examples of com.google.ical.values.RRule

  private static final DateValue DT_START = new DateValueImpl(2006, 4, 3);
  private static final DateValue T0 = new DateValueImpl(2006, 8, 3);

  void runOne() throws Exception {
    for (String rdata : RECURRENCE_RULES) {
      RRule rrule = new RRule(rdata);
      RecurrenceIterator iter =
        RecurrenceIteratorFactory.createRecurrenceIterator(
            rrule, DT_START, TimeUtils.utcTimezone());
      iter.advanceTo(T0);
      for (int k = 20; iter.hasNext() && --k >= 0;) {
View Full Code Here

Examples of com.google.ical.values.RRule

    int nbad = 0;
    for (int i = 0; i < lines.length; ++i) {
      String line = lines[i].trim();
      try {
        if (RULE.matcher(line).find()) {
          out[i] = new RRule(line);
        } else if (DATE.matcher(line).find()) {
          out[i] = new RDateList(line, tzid);
        } else {
          throw new ParseException(lines[i], i);
        }
View Full Code Here

Examples of net.fortuna.ical4j.model.property.RRule

        sb.append("=");
        sb.append(recurEndDT.toString());
      }
      try {
        Recur recur = new Recur(sb.toString());
        RRule rrule = new RRule(recur);
        return rrule.getValue();
      } catch (ParseException e) {
        Tracing.createLoggerFor(CalendarUtils.class).error("cannot create recurrence rule: " + recurrence.toString(), e);
      }
    }
   
View Full Code Here

Examples of net.fortuna.ical4j.model.property.RRule

    // recurrence
    String recurrence = kEvent.getRecurrenceRule();
    if(recurrence != null && !recurrence.equals("")) {
      try {
        Recur recur = new Recur(recurrence);
        RRule rrule = new RRule(recur);
        vEventProperties.add(rrule);
      } catch (ParseException e) {
        Tracing.createLoggerFor(getClass()).error("cannot create recurrence rule: " + recurrence.toString(), e);
      }
    }
View Full Code Here

Examples of net.fortuna.ical4j.model.property.RRule

    public VEvent getRecessEvent() {
        if (startRecess == null)
            return null;
        VEvent v = new VEvent(getStartRecessDate(), "Recess Week");
        PropertyList pl = v.getProperties();
        pl.add(new RRule(new Recur(Recur.DAILY, 5)));
        try {
            UidGenerator ug = new UidGenerator("1");
            pl.add(ug.generateUid());
        } catch (SocketException ex) {
        }
View Full Code Here

Examples of net.fortuna.ical4j.model.property.RRule

        pl.add(new Summary(course.getCourseName() + " " + ct.getClassType()
                + " " + ct.getRemark()));
        String[] split = ct.getSemesterTimetable().getStartExam().split("-");
        String str = split[0] + split[1] + split[2];
        try {
            pl.add(new RRule(new Recur(Recur.WEEKLY, new Date(str))));
        } catch (ParseException ex) {
            Logger.getLogger(ClassVEvent.class).error("Error when parsing "
                    + "recurrence rule for " + course.getCourseName()
                    + " class timetable", ex);
        }
View Full Code Here

Examples of net.fortuna.ical4j.model.property.RRule

            if (day == java.util.Calendar.SUNDAY)
                recur.getDayList().add(new WeekDay(week + "SU"));
        }
       
        recur.setWeekStartDay("MO");
        return new RRule(recur);
    }
View Full Code Here

Examples of net.fortuna.ical4j.model.property.RRule

          if (teamEvent.hasRecurrence() == true) {
            final Recur recur = teamEvent.getRecurrenceObject();
            if (recur.getUntil() != null) {
              recur.setUntil(ICal4JUtils.getICal4jDateTime(CalendarUtils.getEndOfDay(recur.getUntil(), timeZone), timeZone));
            }
            final RRule rrule = new RRule(recur);
            vEvent.getProperties().add(rrule);
            if (teamEvent.getRecurrenceExDate() != null) {
              final List<net.fortuna.ical4j.model.Date> exDates = ICal4JUtils.parseISODateStringsAsICal4jDates(
                  teamEvent.getRecurrenceExDate(), timeZone);
              if (CollectionUtils.isEmpty(exDates) == false) {
View Full Code Here

Examples of net.fortuna.ical4j.model.property.RRule

   * @return the recurrenceRuleObject
   */
  @Transient
  public Recur getRecurrenceObject()
  {
    final RRule rrule = getRecurrenceRuleObject();
    return rrule != null ? rrule.getRecur() : null;
  }
View Full Code Here

Examples of net.fortuna.ical4j.model.property.RRule

  public static VEvent createVEvent(final TeamEventDO eventDO, final TimeZone timezone)
  {
    final VEvent vEvent = ICal4JUtils.createVEvent(eventDO.getStartDate(), eventDO.getEndDate(), eventDO.getUid(), eventDO.getSubject(),
        eventDO.isAllDay(), timezone);
    if (eventDO.hasRecurrence() == true) {
      final RRule rrule = eventDO.getRecurrenceRuleObject();
      vEvent.getProperties().add(rrule);
    }
    return vEvent;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.