-
Notifications
You must be signed in to change notification settings - Fork 44
FAQ
Set the DTSTART
property to a date value and do not specify an end date (see: RFC 5546 Section 4.1.5).
VEvent event = new VEvent();
Date start = ...
event.setDateStart(start, false);
(see: RFC 5546 Section 4.1.3)
ICalendar ical = new ICalendar();
ical.setMethod("CANCEL");
VEvent event = new VEvent();
event.setOrganizer("[email protected]"); //the organizer of the existing event
event.setUid(...); //the UID of the existing event
event.setSequence(2); //increment the sequence number of the existing event
event.addComment(...); //optional: describe why it was cancelled
ical.addEvent(event);
RecurrenceRuleScribe scribe = new RecurrenceRuleScribe();
ParseContext context = new ParseContext();
context.setVersion(ICalVersion.V2_0);
RecurrenceRule rrule = scribe.parseText("FREQ=WEEKLY;INTERVAL=2", null, new ICalParameters(), context);
Recurrence recur = rrule.getValue();
Date start = ...
TimeZone timezone = ...
DateIterator it = rrule.getDateIterator(start, timezone);
while (it.hasNext()) {
System.out.println(it.next());
}
Recurrence recur = new Recurrence.Builder(Frequency.WEEKLY).interval(2).build();
RecurrenceRule rrule = new RecurrenceRule(recur);
WriteContext context = new WriteContext(ICalVersion.V2_0, new TimezoneInfo(), null);
RecurrenceRuleScribe scribe = new RecurrenceRuleScribe();
System.out.println(scribe.writeText(rrule, context));
//prints: FREQ=WEEKLY;INTERVAL=2
biweekly is maintained by Michael Angstadt
Table of Contents
Getting started
Examples
FAQ
Javadocs
Downloads
1 An Overview of the iCalendar data format
2 Reading and Writing iCalendar data with biweekly
2.1 Plain-text (traditional)
2.2 XML-encoded (xCal)
2.3 JSON-encoded (jCal)
4 Working with Timezones
4.1 0.4.6 and earlier
4.2 0.5.0 and later
5 Dealing with Non-standard Data
5.1 Non-standard components
5.2 Non-standard properties
5.3 Non-standard parameters
6 Project Information
6.1 Dependencies
6.2 Supported Specifications
6.3 Changelog
7 Reference
7.1 iCalendar Component Reference
7.2 iCalendar Property Reference
7.3 Javadocs