hammerspoon2-docs
    Preparing search index...

    Class HSCalendarEvent

    An event from a calendar, as returned by hs.eventkit.events() and its relatives.

    Each property is read from the underlying calendar event when you access it, so fetching many events is cheap even when you only look at a few of their properties. An event is a snapshot: if it changes in Calendar after you fetched it, fetch it again to see the change.

    Don't create these yourself; they come from hs.eventkit.

    Index
    availability: string

    How the event shows on a schedule: "busy", "free", "tentative", "unavailable", or "notSupported" when its calendar doesn't support availability.

    calendarID: string | null

    The identifier of the event's calendar, as in hs.eventkit.calendars().

    calendarTitle: string | null

    The title of the event's calendar.

    endDate: Date

    When the event ends.

    externalID: string | null

    The identifier the calendar server gives the event, which is the same on every device but isn't guaranteed to be unique.

    id: string

    The event's identifier on this Mac.

    Every occurrence of a repeating event has the same id, so use it together with occurrenceDate (or startDate) to tell occurrences apart.

    isActive: boolean

    Whether the event is happening now: from its start up to (but not including) its end, or for an all-day event, at any time on the days it covers.

    This is worked out each time you read it, so a long-lived event object stays accurate.

    isAllDay: boolean

    Whether this is an all-day event.

    isDetached: boolean

    Whether this occurrence of a repeating event has been changed from the rest.

    isRecurring: boolean

    Whether the event repeats.

    location: string | null

    The event's location, which often holds a Zoom or Teams link.

    notes: string | null

    The event's notes (its description), which often hold a meeting link.

    occurrenceDate: Date | null

    The original start of this occurrence of a repeating event, which stays the same if the occurrence is moved.

    startDate: Date

    When the event starts.

    status: string

    The event's status: "none", "confirmed", "tentative" or "canceled".

    timeZone: string | null

    The event's time zone (e.g. "Europe/London"), or null for a floating event that follows the Mac's time zone.

    title: string

    The event's title.

    url: string | null

    The URL attached to the event.

    • Returns a plain object holding all of the event's properties, for JSON serialisation.

      JSON.stringify() calls this automatically, so you rarely need to call it yourself.

      Returns {
          availability:
              | "tentative"
              | "busy"
              | "free"
              | "unavailable"
              | "notSupported";
          calendarID: string
          | null;
          calendarTitle: string | null;
          endDate: Date;
          externalID: string | null;
          id: string;
          isActive: boolean;
          isAllDay: boolean;
          isDetached: boolean;
          isRecurring: boolean;
          location: string | null;
          notes: string | null;
          occurrenceDate: Date | null;
          startDate: Date;
          status: "none" | "confirmed" | "tentative" | "canceled";
          timeZone: string | null;
          title: string;
          url: string | null;
      }

      An object with every property of the event, with the values of its properties of the same names