# GetCalendarEventsForDisplay - Advanced Documentation ## Overview Returns calendar events formatted for display within a date range, filtered by person and resource. Includes attendees, resources, associated claims, and editors. Private events are masked for non-attendees/non-editors. ## Date Range Behavior The system automatically extends single-day searches by +/- 1 day to ensure proper coverage of events that span midnight boundaries. No action needed from the caller. ## Private Event Masking Events marked as private are handled specially: - **Attendees and editors** see the full event details - **Everyone else** sees the event with the title replaced with "Private" - all other details are masked - The masking is server-side; the caller cannot bypass it ## Script Example ```javascript async () => { const events = await SecureApi.GetCalendarEventsForDisplay( [8514], // PersonIDs [], // ResourceIDs (none) "2025-04-01", // StartDate "2025-04-30" // EndDate ); return events.map(e => ({ title: e.Title, start: e.Start, end: e.End, type: e.EventType?.Name, claims: e.AssociatedClaims?.map(c => c.Name), attendees: e.Attendees?.map(a => a.Name) })); } ```