Constructor
new Event(componentopt, optionsopt)
Creates a new ICAL.Event instance.
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
component | ICAL. | <optional> | The ICAL.Component to base this event on | ||||||||||||
options | Object | <optional> | Options for this event Properties
|
Members
attendees :Array.<Property>
The attendees in the event
- Array.<Property>
color :String
The event color from rfc7986
- String
description :String
The event description.
- String
duration :ICAL.Duration
The duration. This can be the result directly from the property, or the duration calculated from start date and end date. Setting the property will remove any dtend
properties.
endDate :ICAL.Time
The end date. This can be the result directly from the property, or the end date calculated from start date and duration. Setting the property will remove any duration properties.
exceptions :Array.<Event>
List of related event exceptions.
- Array.<Event>
location :String
The location of the event.
- String
organizer :String
The organizer value as an uri. In most cases this is a mailto: uri, but it can also be something else, like urn:uuid:...
- String
recurrenceId :ICAL.Time
The recurrence id for this event. See terminology for details.
sequence :Number
The sequence value for this event. Used for scheduling see terminology.
- Number
startDate :ICAL.Time
The start date
strictExceptions :Boolean
When true, will verify exceptions are related by their UUID.
- Boolean
summary :String
The event summary
- String
uid :String
The uid of this event
- String
Methods
findRangeException(time) → (nullable) {ICAL.Event}
Finds the range exception nearest to the given date.
Name | Type | Description |
---|---|---|
time | ICAL. | usually an occurrence time of an event |
the related event/exception or null
- Type:
- ICAL.
Event
getOccurrenceDetails(occurrence) → {ICAL.Event.occurrenceDetails}
Returns the occurrence details based on its start time. If the occurrence has an exception will return the details for that exception.
NOTE: this method is intend to be used in conjunction with the iterator method.
Name | Type | Description |
---|---|---|
occurrence | ICAL. | time occurrence |
Information about the occurrence
getRecurrenceTypes() → {Object.<ICAL.Recur.frequencyValues, Boolean>}
Returns the types of recurrences this event may have.
Returned as an object with the following possible keys:
- YEARLY
- MONTHLY
- WEEKLY
- DAILY
- MINUTELY
- SECONDLY
Object of recurrence flags
- Type:
- Object.<ICAL.Recur.frequencyValues, Boolean>
isRecurrenceException() → {Boolean}
Checks if the event describes a recurrence exception. See terminology for details.
True, if the event describes a recurrence exception
- Type:
- Boolean
isRecurring() → {Boolean}
Checks if the event is recurring
True, if event is recurring
- Type:
- Boolean
iterator(startTimeopt) → {ICAL.RecurExpansion}
Builds a recur expansion instance for a specific point in time (defaults to startDate).
Name | Type | Attributes | Description |
---|---|---|---|
startTime | ICAL. | <optional> | Starting point for expansion |
Expansion object
- Type:
- ICAL.
RecurExpansion
modifiesFuture() → {Boolean}
Checks if this record is an exception and has the RANGE=THISANDFUTURE value.
True, when exception is within range
- Type:
- Boolean
relateException(obj)
Relates a given event exception to this object. If the given component does not share the UID of this event it cannot be related and will throw an exception.
If this component is an exception it cannot have other exceptions related to it.
Name | Type | Description |
---|---|---|
obj | ICAL. | Component or event |
toString() → {String}
The string representation of this event.
- Type:
- String
Type Definitions
occurrenceDetails
This object is returned by getOccurrenceDetails
- Object
Name | Type | Description |
---|---|---|
recurrenceId | ICAL. | The passed in recurrence id |
item | ICAL. | The occurrence |
startDate | ICAL. | The start of the occurrence |
endDate | ICAL. | The end of the occurrence |