Kind: Function
Source: Outlook_plugin/src/calendar/calendar.model.ts (line 376)
Part of: Calendar
Helper function to create recurring weekly meeting
createWeeklyRecurringEvent creates the calendar event data needed for a meeting that repeats every week. It centralizes recurring-meeting setup in the calendar model so Outlook calendar flows can use a consistent event shape.
Signature
tsfunction createWeeklyRecurringEvent(subject: string, startDate: Date, duration: number, dayOfWeek: DayOfWeek, numberOfOccurrences: number, location: string, attendees: string[]): CreateEventRequest
Parameters
| Name | Type |
|---|---|
subject | string |
startDate | Date |
duration | number |
dayOfWeek | DayOfWeek |
numberOfOccurrences | number |
location | string |
attendees | string[] |
Returns: CreateEventRequest
Diagram
mermaidgraph LR A[Calendar UI or command] --> B[createWeeklyRecurringEvent] B --> C[Weekly recurrence data] C --> D[Outlook event request] D --> E[Recurring calendar meeting]
Usage
tsimport { createWeeklyRecurringEvent } from "./calendar.model";
const weeklyMeeting = createWeeklyRecurringEvent();
await createOutlookCalendarEvent(weeklyMeeting);
AI Coding Instructions
- Keep recurrence construction inside
calendar.model.tsrather than duplicating recurrence objects in UI code. - Preserve the event shape expected by the Outlook calendar API when changing this helper.
- Check that meeting start and end values remain compatible with the recurrence range.
- Reuse this helper for weekly meetings so recurrence behavior stays consistent across calendar actions.
Was this page helpful?