Examples of WeekDayList


Examples of net.fortuna.ical4j.model.WeekDayList

  public static String getRecurrence(String rule) {
    if (rule != null) {
      try {
        Recur recur = new Recur(rule);
        String frequency = recur.getFrequency();
        WeekDayList wdl = recur.getDayList();
        Integer interval = recur.getInterval();
        if((wdl != null && wdl.size() > 0)) {
          // we only support one rule with daylist
          return KalendarEvent.WORKDAILY;
        } else if(interval != null && interval == 2) {
          // we only support one rule with interval
          return KalendarEvent.BIWEEKLY;
View Full Code Here

Examples of net.fortuna.ical4j.model.WeekDayList

            } else {
                humanReadable = "Every " + recur.getInterval() + " weeks";
            }

            humanReadable += " on ";
            final WeekDayList weekDayList = recur.getDayList();

            for (@SuppressWarnings("rawtypes")
            final Iterator iterator = weekDayList.iterator(); iterator.hasNext();) {
                final WeekDay weekDay = (WeekDay) iterator.next();
                humanReadable += DayNameEnum.from(weekDay.getDay()).getCode();
            }

        } else if (recur.getFrequency().equals(Recur.MONTHLY)) {
View Full Code Here

Examples of net.fortuna.ical4j.model.WeekDayList

        return CalendarFrequencyType.fromString(recur.getFrequency());
    }

    public static CalendarWeekDaysType getRepeatsOnDay(final String recurringRule) {
        final Recur recur = CalendarUtils.getICalRecur(recurringRule);
        final WeekDayList weekDays = recur.getDayList();
        if (weekDays.isEmpty()) return CalendarWeekDaysType.INVALID;
        // supports only one day
        WeekDay weekDay = (WeekDay) weekDays.get(0);
        return CalendarWeekDaysType.fromString(weekDay.getDay());
    }
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.