ICalOperations
🔧 generateICalData
Generate iCal data for event
function generateICalData($uuid, array $eventData): string {
$now = gmdate('Ymd\THis\Z');
// Handle different date formats based on event type
if ($eventData['isAllDay'] || $eventData['category'] === 'allday') {
$startFormat = 'Ymd';
$endFormat = 'Ymd';
$dateType = 'DATE';
} else {
$startFormat = 'Ymd\THis\Z';
$endFormat = 'Ymd\THis\Z';
$dateType = 'DATE-TIME';
// ... (truncated)
🔧 escapeICalText
Escape special characters in iCal text
function escapeICalText(string $text): string {
$text = str_replace(['\\', ',', ';'], ['\\\\', '\\,', '\\;'], $text);
return preg_replace('/[\r\n]+/', '\\n', $text);
}