Menu

Components List

Michael Angstadt

[Home]

Components List

biweekly supports all of the components defined in the iCal standard.


DAYLIGHT

Defines a daylight savings time range within a VTIMEZONE component.

Definition: RFC 5545 p.62-71
Java class: DaylightSavingsTime

Examples:

VTimezone timezone = new VTimezone("Eastern Standard Time");
DaylightSavingsTime daylight = new DaylightSavingsTime();
Date start = ...
daylight.setDateStart(start);
daylight.setTimezoneOffsetFrom(-5, 0);
daylight.setTimezoneOffsetTo(-4, 0);
timezone.addDaylightSavingsTime(daylight);

STANDARD

Defines a standard time range within a VTIMEZONE component.

Definition: RFC 5545 p.62-71
Java class: StandardTime

Examples:

VTimezone timezone = new VTimezone("Eastern Standard Time");
StandardTime standard = new StandardTime();
Date start = ...
standard.setDateStart(start);
standard.setTimezoneOffsetFrom(-4, 0);
standard.setTimezoneOffsetTo(-5, 0);
timezone.addStandardTime(standard);

VALARM

Defines a reminder for an event or to-do task. This class contains static factory methods to aid in the construction of valid alarms.

Definition: RFC 5545 p.71-6
Java class: VAlarm

Examples:

//audio alarm
Trigger trigger = ...
Attachment sound = ...
VAlarm audio = VAlarm.audio(trigger, sound);

//display alarm
Trigger trigger = ...
String message = "Meeting at 1pm";
VAlarm display = VAlarm.display(trigger, message);

//email alarm
Trigger trigger = ...
String subject = "Reminder: Meeting at 1pm";
String body = "Team,\n\nThe team meeting scheduled for 1pm is about to start.  Snacks will be served!\n\nThanks,\nJohn";
List<String> to = Arrays.asList("janedoe@example.com", "bobsmith@example.com");
VAlarm email = VAlarm.email(trigger, subject, body, to);

VEVENT

Defines a scheduled activity, such as a meeting that's two hours long.

Definition: RFC 5545 p.52-5
Java class: VEvent

Examples:

VEvent event = new VEvent();
Date start = ...
event.setDateStart(start);
Date end = ...
event.setDateEnd(end);
event.setSummary("Team Meeting");
event.setLocation("Room 21C");
event.setCreated(new Date());
event.setRecurrenceRule(new RecurrenceRule(Frequency.WEEKLY));

VFREEBUSY

Defines a collection of time ranges that describe when the person is available or unavailable.

Definition: RFC 5545 p.59-62
Java class: VFreeBusy

Examples:

VFreeBusy freebusy = new VFreeBusy();

FreeBusy fb = new FreeBusy();
fb.setType(FreeBusyType.BUSY);

Date onePM = ...
Date threePM = ...
fb.addValue(onePM, threePM);

Date fourPM = ...
Duration oneHour = new Duration.Builder().hours(1).build();
fb.addValue(fourPM, oneHour);

freebusy.addFreeBusy(fb);

VJOURNAL

Defines descriptive text associated with the calendar data.

Definition: RFC 5545 p.57-9
Java class: VJournal

Examples:

VJournal journal = new VJournal();
journal.setSummary("Team Meeting");
journal.setDescription("The following items were discussed: ...");
byte[] slides = ...
journal.addAttachment(new Attachment("application/vnd.ms-powerpoint", slides));

VTIMEZONE

Defines a timezone's UTC offsets throughout the year.

Definition: RFC 5545 p.62-71
Java class: VTimezone

Examples:

VTimezone timezone = new VTimezone("Eastern Standard Time");

StandardTime standard = new StandardTime();
Date startStandard = ...
standard.setDateStart(startStandard);
standard.setTimezoneOffsetFrom(-4, 0);
standard.setTimezoneOffsetTo(-5, 0);
timezone.addStandardTime(standard);

DaylightSavingsTime daylight = new DaylightSavingsTime();
Date startDaylight = ...
daylight.setDateStart(startDaylight);
daylight.setTimezoneOffsetFrom(-5, 0);
daylight.setTimezoneOffsetTo(-4, 0);
timezone.addDaylightSavingsTime(daylight);

VTODO

Defines a task or assignment.

Definition: RFC 5545 p.55-7
Java class: VTodo

Examples:

VTodo todo = new VTodo();
todo.setSummary("Complete report");
Date due = ...
todo.setDateDue(due);
todo.setStatus(Status.confirmed());

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.