RFC2445를 구현한 라이브러리
프로젝트 페이지: http://ical4j.sourceforge.net/
API: http://ical4j.sourceforge.net/apidocs/index.html
- 일단위 반복
Recur recur = new Recur(Recur.DAILY, new net.fortuna.ical4j.model.Date(until.getTime()));
recur.setInterval(scheduleList.getInt("repeat_day"));
VEvent vEvent = ICalendarUtil.createEvent(c1, c2, title, scheduleId);
RRule rrule = new RRule(recur);
vEvent.getProperties().add(rrule);
eventList.add(vEvent);
recur.setInterval(scheduleList.getInt("repeat_day"));
VEvent vEvent = ICalendarUtil.createEvent(c1, c2, title, scheduleId);
RRule rrule = new RRule(recur);
vEvent.getProperties().add(rrule);
eventList.add(vEvent);
- 주단위 반복 (매주 월화)
Recur recur = new Recur(Recur.WEEKLY, new net.fortuna.ical4j.model.Date(until.getTime()));
recur.getDayList().add(WeekDay.MO);
recur.getDayList().add(WeekDay.TU);
recur.setInterval(1);
RRule rrule = new RRule(recur);
vEvent.getProperties().add(rrule);
List<VEvent> eventList = new ArrayList<VEvent>();
eventList.add(vEvent);
댓글 없음:
댓글 쓰기