format(DATE_FORMAT_ICAL); print "BEGIN:VEVENT\r\n"; print "UID:" . $event['uid'] . "\r\n"; print "SUMMARY:" . $event['summary'] . "\r\n"; print "DTSTAMP:" . $current_date . "Z\r\n"; if ($event['all_day']): print "DTSTART;VALUE=DATE:" . $event['start'] . "\r\n"; else: print "DTSTART:" . $event['start'] . "Z\r\n"; endif; if (!empty($event['end'])): if (!empty($event['all_day'])): print "DTEND;VALUE=DATE:" . $event['end'] . "\r\n"; else: print "DTEND:" . $event['end'] . "Z\r\n"; endif; endif; if (!empty($event['rrule'])) { print $event['rrule'] . "\r\n"; } if (!empty($event['url'])) { print "URL;VALUE=URI:" . $event['url'] . "\r\n"; } if (!empty($event['location'])) { print "LOCATION:" . $event['location'] . "\r\n"; } if (!empty($event['description'])) { print "DESCRIPTION:" . $event['description'] . "\r\n"; } print "END:VEVENT\r\n";