iCal format for different frequency of events

Author - Webner

Format for various type of event occurrence in iCal

Description: Calendar events can be of multiple types like which can occur on daily basis, weekly, monthly or on custom days of the same month. So, followings are the ways how we can use these types of events in iCal so that they can be shown at the proper dates in required calendar.

1. One Session Event: One session event occurs only a single day, we can use DTSTART;TZID and DTEND;TZID parameters for this.

Following is the sample format:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//www.marudot.com//iCal Event Maker
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Asia/Kolkata
TZURL:http://tzurl.org/zoneinfo-outlook/Asia/Kolkata
X-LIC-LOCATION:Asia/Kolkata
BEGIN:STANDARD
TZOFFSETFROM:+0530
TZOFFSETTO:+0530
TZNAME:IST
DTSTART:19700101T000000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20180705T083858Z
UID:20180705T083858Z-33619724@marudot.com
DTSTART;TZID=”Asia/Calcutta”:20180710T120000
DTEND;TZID=”Asia/Calcutta”:20180710T120000
SUMMARY:Single Day Event
DESCRIPTION:This is a single day event.
END:VEVENT
END:VCALENDAR

2. Daily: Daily events occur on concurrent days. We can use iCal RRULE property for this along with the DTSTART;TZID and DTEND;TZID parameters like below:

BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
PRODID:-//www.marudot.com//iCal Event Maker
BEGIN:VTIMEZONE
TZID:Asia/Kolkata
TZURL:http://tzurl.org/zoneinfo-outlook/Asia/Kolkata
X-LIC-LOCATION:Asia/Kolkata
BEGIN:DAYLIGHT
TZOFFSETFROM:-0700
TZOFFSETTO:-0600
TZNAME:MDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0600
TZOFFSETTO:-0700
TZNAME:MST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20180705T094612Z
DTSTART;TZID=Asia/Kolkata:20180716T060000
DTEND;TZID=Asia/Kolkata:20180716T070000
SUMMARY:Daily Event Test
LOCATION:Webner Solution
UID:-1949206556@webners.com
ORGANIZER:manju.kashyap@webners.com
RRULE:FREQ=DAILY;COUNT=5
DESCRIPTION:This is an example of daily event.
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR

This will be shown on calendar like below:

iCal format for different frequency of events

 
3. Weekly: Weekly event can also be created using the same RRULE property like Daily basis events as shown below:

DTSTART;TZID=Asia/Kolkata:20180710T070000
DTEND;TZID=Asia/Kolkata:20180710T080000
RRULE:FREQ=WEEKLY;COUNT=3

Example:

iCal format for different frequency of events

Monthly: This will also use the same properties as weekly and daily events except for the value of the FREQ parameter as shown:

DTSTART;TZID=Asia/Kolkata:20180710T070000
DTEND;TZID=Asia/Kolkata:20180710T080000
RRULE:FREQ=MONTHLY;COUNT=6;BYMONTHDAY=5

Custom: While creating custom events remember to remove RRULE property. We can create custom events by writing the details of each day event between two parameters i.e. BEGIN:VEVENT and END:VEVENT like below:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//webners-366-2062709//NONSGML kigkonsult.se iCalcreator 2.22//
METHOD:REQUEST
X-WR-TIMEZONE:UTC
BEGIN:VEVENT
UID:20180806T063000webners-366-2062709
DTSTAMP:20180629T115046Z
ATTENDEE;RSVP=TRUE;CN=RahulKumar Kumar;X-NUM-GUESTS=0:MAILTO:Rahul.kuma
r@webners.com
DESCRIPTION:Location Name: moga\nAddress: Webner Solutions\, Sector 67\, Di
bon Building\, Mohali\, Punjab\, India-160062\nPhone number: 9780492175\nI
nstructor Name: manju.kashyap\nInstructor Email: manju.kashyap@mailinator.
com\nClass Description:&nbsp\;Multi Session iCal testing
DTSTART:20180806T063000Z
DTEND:20180806T000000Z
LOCATION:Webner Solutions\, Sector 67\, Dibon Building\, Mohali\, Punjab\,
India-160062
ORGANIZER;CN=manju.kashyap;SENT-BY=”MAILTO:manju.kashyap@mailinator.com”:MA
ILTO:manju.kashyap@mailinator.com
SEQUENCE:1530273046
STATUS:CONFIRMED
SUMMARY:Multi Session iCal testing
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
UID:20180809T103000webners-366-2062709
DTSTAMP:20180629T115046Z
ATTENDEE;RSVP=TRUE;CN=RahulKumar Kumar;X-NUM-GUESTS=0:MAILTO:Rahul.kuma
r@webners.com
DESCRIPTION:Location Name: moga\nAddress: Webner Solutions\, Sector 67\, Di
bon Building\, Mohali\, Punjab\, India-160062\nPhone number: 9780492175\nI
nstructor Name: manju.kashyap\nInstructor Email: manju.kashyap@mailinator.
com\nClass Description:&nbsp\;Multi Session iCal testing
DTSTART:20180809T103000Z
DTEND:20180809T000000Z
LOCATION:Webner Solutions\, Sector 67\, Dibon Building\, Mohali\, Punjab\,
India-160062
ORGANIZER;CN=manju.kashyap;SENT-BY=”MAILTO:manju.kashyap@mailinator.com”:MA
ILTO:manju.kashyap@mailinator.com
SEQUENCE:1530273046
STATUS:CONFIRMED
SUMMARY:Multi Session iCal testing
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published. Required fields are marked *