Calendar

From RaySoft

Calendar is a personal calendar app made by Apple Inc. that runs on both the macOS desktop operating system and the iOS mobile operating system. It offers online cloud backup of calendars using Apple's iCloud service, or can synchronize with other calendar services, including Google Calendar and Microsoft Exchange Server.[1]

Documentation

Hints

Use AppleScript to add a new event if it does not already exist.
set myEventSummary to "Holidays"

set myStartDate to date ("25.04.2023")
set myEndDate to date ("28.04.2023")

set myCount to (myEndDate - myStartDate) div days + 1

tell application "Calendar"
    activate
    
    tell calendar "Work"
        if summary of events does not contain myEventSummary ¬
        then
            make new event with properties { ¬
                summary:myEventSummary, allday event:true, ¬
                start date:myStartDate, end date:myStartDate, ¬
                recurrence:"FREQ=DAILY;INTERVAL=1;COUNT=" & myCount ¬
            }
        else
            return "An event with the summery '" & myEventSummary & "' already exists!"
        end if
    end tell
end tell

References