vobject.event() RFC
This is a VEVENT component which is a subclass of the component
object.
Usage:
var event = vobject.event();
event.setDTStart(vobject.dateTimeValue('2013-08-14T19:00:00-04:00'));
event.setDTEnd(vobject.dateTimeValue('2013-08-14T20:00:00-04:00'));
event.setUID('6ltoah87095h151231fqugp2ombm8@sunrise.am');
event.setSummary('Night Photowalk');
event.toICS();
Example:
BEGIN:VEVENT
DTSTART:20130814T230000Z
DTEND:20130815T003000Z
DTSTAMP:20130812T182800Z
ORGANIZER;CN=jerome@domain.com:mailto:jerome@domain.com
UID:6ltoah87095h151231fqugp2ombm8@sunrise.am
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
TRUE;CN=John Smith;X-NUM-GUESTS=0:mailto:john.smith@email.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
TRUE;CN=Matthew White;X-NUM-GUESTS=0:mailto:matthew@white.org
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
TRUE;CN=Paul Malone;X-NUM-GUESTS=0:mailto:paul_malone@courriel.fr
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE
;CN=jerome@domain.com;X-NUM-GUESTS=0:mailto:jerome@domain.com
CREATED:20130812T180357Z
DESCRIPTION:Drinks
LAST-MODIFIED:20130812T182800Z
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:Night Photowalk
TRANSP:OPAQUE
END:VEVENT
event.setUID(uid) RFC
uid
for the event. Expects a STRING. Ex:6ltoah81242h15kgqugp7ombm8@sunrise.am
This property defines the persistent, globally unique identifier for the calendar component.
event.getUID() RFC
- returns the UID for the event or
undefined
by default
event.setSummary(summary) RFC
summary
to set for the event. Expects a STRING. Ex: "Dinner at Peels"
Also known as the title for the event.
event.getSummary() RFC
- returns the unescaped summary for the event or
undefined
by default
event.setDTStart(date) RFC
date
to set as the start date. Expects either adateValue
ordateTimeValue
object. If a TZID is specified for the dateTimeValue, the property will be set with a floating date format. SeedateTimeValue.toICS()
for more information
event.getDTStart() RFC
- returns the
dateValue
ordateTimeValue
set as the start date for the event, otherwiseundefined
by default
event.setDTEnd(date) RFC
date
to set as the end date. Expects either adateValue
ordateTimeValue
object. If a TZID is specified for the dateTimeValue, the property will be set with a floating date format. SeedateTimeValue.toICS()
for more information
event.getDTEnd() RFC
- returns the
dateValue
ordateTimeValue
set as the end date for the event, otherwiseundefined
by default
event.setDescription(description) RFC
description
to set for the event. Expects a STRING. Ex: "Meet at the corner of Broadway and Lafayette"
event.getDescription() RFC
- returns the unescaped description for the event or
undefined
by default
event.setLocation(location) RFC
location
to set for the event. Expects a STRING. Ex: "123 Fake St.""
event.getLocation() RFC
- returns the unescaped location for the event or
undefined
by default
event.setStatus(status) RFC
status
to set for the event. Expects a STRING. Ex:TENTATIVE
,CONFIRMED
,CANCELLED
Status values for a VEVENT
"TENTATIVE" ;Indicates event is tentative.
"CONFIRMED" ;Indicates event is definite.
"CANCELLED" ;Indicates event was cancelled.
event.getStatus() RFC
- returns the status of the event or
undefined
by default
event.setDTStamp(date) RFC
date
to set as the timestamp for the event. Expects either adateTimeValue
object
In the case of an iCalendar object that specifies a "METHOD" property, this property specifies the date and time that
the instance of the iCalendar object was created. In the case of an iCalendar object that doesn't specify a "METHOD"
property, this property specifies the date and time that the information associated with the calendar component was
last revised in the calendar store.
event.getDTStamp() RFC
- returns a string representation of the timestamp for the event or
undefined
by default
event.setLastModified(date) RFC
date
to set as the last modified date for the event. Expects adateTimeValue
object
event.getLastModified() RFC
- returns a string representation of the last modified date for the event or
undefined
by default
event.setSequence(sequence) RFC
sequence
to set as the sequence number of the event. Expects an INTEGER
Sequence number of the event. Should be monotonically increasing on changes on the fields: DTSTART
, DTEND
, DUE
, RDATE
, RRULE
, EXDATE
, EXRULE
, and STATUS
.
event.getSequence() RFC
- returns the sequence number for the event or
undefined
by default
event.setCreated(date) RFC
date
to set as the creation date. Expects either adateValue
ordateTimeValue
object
event.getCreated() RFC
- returns a string representation of the creation date for the event or
undefined
by default
event.setOrganizer(organizer) RFC
organizer
to set for the event. Expects anorganizer
object
event.getOrganizer() RFC
- returns the
organizer
property for the event orundefined
by default
event.addAttendee(attendee) RFC
attendee
to be added to the event. Expects anattendee
object
event.getAttendees() RFC
- returns an array of
attendee
properties for the event or[]
by default
event.addRRULE(rrule) RFC
rrule
to be added to the event. Expects an ICS STRING. Ex:RRULE:FREQ=DAILY
event.getRRULEs() RFC
- returns an array of RRULE properties or
[]
by default
event.addEXDATE(exdate) RFC
exdate
to be added to the event. Expects an ICS STRING. Ex:EXDATE;VALUE=DATE:20140206
event.getEXDATEs() RFC
- returns an array of EXDATE properties or
[]
by default
event.setRecurrenceID(date) RFC
date
to set as the recurrence id for the event. Expects either adateValue
ordateTimeValue
object
event.getRecurrenceID() RFC
- returns the
dateValue
ordateTimeValue
set as the recurrence id for the event, otherwiseundefined
by default
event.setTransparency(transparency) RFC
transparency
to set for the event. Expects either TRANSPARENT or OPAQUE
event.getTransparency() RFC
- returns the string value set as the transparency of the event or
undefined
by default