location: home > blog » How to make All Day Events in Outlook using iCalendar format

How to make All Day Events in Outlook using iCalendar format

calendar_mashup1.jpg

iCalendar is a file format that allows internet users to download files that automatically add events into their local calendar system. This is how I created All Day Events…

Here is an example of iCalendar file I am exporting:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:PHP
BEGIN:VEVENT
DTSTART:20090514T1500000Z
DTEND:20090515T160000Z
SUMMARY:Super Happy Title goes here
DESCRIPTION:Description here
LOCATION:Happy Land
END:VEVENT
END:VCALENDAR

This event starts at 3PM UTC and ends at 4PM UTC. If we want it last all day it’s as easy as removing the time from the DTSTART and removing DTEND all together.
Like so:

...
DTSTART:20090514T1500000Z
DTEND:20090515T160000Z



=

...
DTSTART:20090514
...

Note: to export in icalendar format in php set the header like this”

header("Content-Type: text/calendar; charset=utf-8");
header("Content-Disposition: inline; filename=calendar.ics");

Then echo something similar to the icalendar example above.

*The calendar picture on this post is a mashup of two good lookin calendars. The top one is the radius 09′ calendar by Justgonesix and the bottom one from the color Calendrier 2009 by Quentin Delobel. Lovely!

Bookmark and Share

Leave a Reply