/** Initialize RRule instance */
  private static RRule initRRule(String recurrence) throws ParseException {
    RRule rrule = new RRule(recurrence);

    // handle the iCalendar "byDay" field differently depending on if
    // we are weekly or otherwise
    if (rrule.getFreq() != Frequency.WEEKLY) rrule.setByDay(Collections.EMPTY_LIST);

    return rrule;
  }
 private void setRRuleDays(RRule rrule, Weekday... weekdays) {
   ArrayList<WeekdayNum> days = new ArrayList<WeekdayNum>();
   for (Weekday wd : weekdays) days.add(new WeekdayNum(0, wd));
   rrule.setByDay(days);
 }