Calendar & Events
Calendar is a native OcaltQL domain. Events, recurrence, reminders, availability, and import/export are all first-class verbs. There is no prefix namespace and no string-parsing of dates or intervals.
NEW EVENT
Creates a calendar event. All modifiers are optional except the title. SET captures the event object.
NEW EVENT "Team Standup"
ON "2026-07-01" FROM "09:00" TO "09:30"
TIMEZONE "Africa/Johannesburg"
WITH DESCRIPTION "Daily team sync"
WITH ATTENDEES "alice@co.com" AND "bob@co.com"
AT LOCATION "Conference Room A"
REMIND 15 MINUTES BEFORE
SET ?ev
AFTER EMIT ?ev("id")
NEW EVENT "Company Holiday"
ON "2026-08-09" ALL DAY
SET ?ev
Recurring Events
EVERY sets the recurrence rule. STARTING and UNTIL bound the series. Without UNTIL, the event recurs indefinitely.
| Keyword | Recurrence |
|---|---|
EVERY DAY | Daily |
EVERY WEEKDAY | Monday through Friday |
EVERY WEEK | Weekly on the same day |
EVERY MONDAY — EVERY SUNDAY | Weekly on a named day |
EVERY MONTH | Monthly on the same date |
EVERY YEAR | Annually on the same date |
NEW EVENT "Weekly Review"
EVERY MONDAY FROM "10:00" TO "11:00"
STARTING "2026-07-07"
UNTIL "2026-12-31"
SET ?ev
Reminders & Triggers
REMIND N MINUTES BEFORE sets a reminder on the event. THEN chains an action to fire when the reminder triggers — any OcaltQL verb is valid after THEN.
NEW EVENT "Weekly Report"
EVERY MONDAY FROM "09:00" TO "09:30"
STARTING "2026-07-07"
REMIND 10 MINUTES BEFORE
THEN MAIL TEXT BODY "Weekly report starting in 10 minutes." TO "admin@myco.com" SUBJECT "Report Reminder"
SET ?ev
AFTER EMIT ?ev("id")
Supported interval units: MINUTES, HOURS, DAYS.
Querying Events
Native temporal keywords replace string arguments. WHERE filters use structured clauses, not string expressions.
GET EVENTS TODAY SET ?today
AFTER GET EVENTS THIS WEEK SET ?thisweek
AFTER GET EVENTS THIS MONTH SET ?thismonth
AFTER GET EVENTS FROM "2026-07-01" TO "2026-07-31" SET ?range
AFTER GET NEXT EVENT SET ?next
AFTER EMIT ?next
GET EVENTS THIS WEEK WHERE TITLE CONTAINS "Standup" SET ?byTitle
AFTER GET EVENTS FROM "2026-07-01" TO "2026-07-31"
WHERE LOCATION IS "Conference Room A"
SET ?byLocation
AFTER EMIT ?byTitle
| WHERE operator | Description |
|---|---|
TITLE IS "..." | Exact title match |
TITLE CONTAINS "..." | Title substring match |
LOCATION IS "..." | Exact location match |
LOCATION CONTAINS "..." | Location substring match |
ATTENDEE IS "..." | Events including a specific attendee |
CALENDAR IS "..." | Events belonging to a named calendar |
Updating Events
UPDATE ?ev modifies an existing event object. Multiple modifiers can be combined in a single update.
UPDATE ?ev
SET TITLE TO "New Title"
UPDATE ?ev
MOVE TO "2026-07-02" FROM "10:00" TO "11:00"
UPDATE ?ev
SET TITLE TO "New Title"
MOVE TO "2026-07-02" FROM "10:00" TO "11:00"
ADD ATTENDEE "carol@co.com"
REMOVE ATTENDEE "bob@co.com"
Removing Events
REMOVE EVENT deletes a single occurrence. AND ALL OCCURRENCES removes the entire recurring series.
REMOVE EVENT ?ev SET ?n
AFTER EMIT "removed: " & ?n
(* AND ALL OCCURRENCES removes the whole recurring series instead of one date *)
AFTER REMOVE EVENT ?series AND ALL OCCURRENCES SET ?total
Calendars
A calendar is a named container for events. Events created without specifying a calendar go into the default calendar.
NEW CALENDAR "Work"
WITH DESCRIPTION "Work schedule"
COLOR "#0057FF"
SET ?cal
AFTER LIST CALENDARS SET ?all
AFTER EMIT ?all
AFTER DROP CALENDAR ?cal SET ?n
Availability & Booking
CHECK AVAILABILITY returns an array of free slots of the requested duration within the given range. BOOK SLOT converts a slot into a confirmed event.
CHECK AVAILABILITY FROM "2026-07-01" TO "2026-07-07" FOR 30 MINUTES SET ?slots
AFTER EMIT ?slots
AFTER BOOK SLOT ?slots(0)
WITH NAME "Carol"
AND EMAIL "carol@example.com"
SET ?booking
AFTER EMIT ?booking("id")
Export & Import
EXPORT CALENDAR ?cal TO FILE "/root/backup.ics" SET ?ical
AFTER EMIT "exported"
IMPORT CALENDAR FROM FILE "/root/events.ics" INTO ?cal SET ?n
AFTER EMIT "Imported: " & ?n & " events"
Event Object Fields
All fields accessed via ?ev("field").
| Field | Type | Description |
|---|---|---|
id | string | Unique event ID |
calendar_id | string | Parent calendar ID |
title | string | Event title |
description | string | Event description |
location | string | Event location |
starts | date | Start timestamp |
ends | date | End timestamp |
timezone | string | IANA timezone string |
all_day | bool | True if all-day event |
attendees | array | List of attendee email addresses |
rrule | string | RFC 5545 recurrence rule |
series_id | string | Shared ID across all occurrences of a recurring event |
created_at | date | Creation timestamp |
Quick Reference
| Verb | Returns |
|---|---|
NEW EVENT "title" | Event object |
GET EVENT ?id | Event object |
GET EVENTS TODAY | Array of events |
GET EVENTS THIS WEEK | Array of events |
GET EVENTS THIS MONTH | Array of events |
GET EVENTS FROM "date" TO "date" | Array of events |
GET EVENTS ... WHERE ... | Array of events |
GET NEXT EVENT | Next event or null |
UPDATE ?ev | True |
REMOVE EVENT ?ev | Count deleted |
REMOVE EVENT ?ev AND ALL OCCURRENCES | Count deleted |
NEW CALENDAR "name" | Calendar object |
LIST CALENDARS | Array of calendars |
DROP CALENDAR ?cal | Count deleted |
CHECK AVAILABILITY FROM ... TO ... FOR ... | Array of free slots |
BOOK SLOT ?slot WITH NAME ... AND EMAIL ... | Event object |
EXPORT CALENDAR ?cal TO FILE "..." | iCal string |
IMPORT CALENDAR FROM FILE "..." INTO ?cal | Count imported |