talawa-api / Exports / helpers/event/recurringEventHelpers/createRecurrenceRule
Module: helpers/event/recurringEventHelpers/createRecurrenceRule
Table of contents
Functions
Functions
createRecurrenceRule
▸ createRecurrenceRule(recurrenceRuleString
, recurrenceStartDate
, recurrenceEndDate
, organizationId
, baseRecurringEventId
, latestInstanceDate
, session
): Promise
<InterfaceRecurrenceRule
>
This function generates the recurrenceRule document.
Parameters
Name | Type | Description |
---|---|---|
recurrenceRuleString | string | the rrule string containing the rules that the instances would follow. |
recurrenceStartDate | Date | start date of recurrence. |
recurrenceEndDate | null | Date | end date of recurrence. |
organizationId | string | _id of the current organization. |
baseRecurringEventId | string | _id of the base recurring event. |
latestInstanceDate | Date | start date of the last instance generated during this operation. |
session | ClientSession | - |
Returns
Promise
<InterfaceRecurrenceRule
>
The recurrence rule document.
Remarks
The following steps are followed:
- Create an rrule object from the rrule string.
- Get the fields for the RecurrenceRule document.
- Create the RecurrenceRuleDocument.
Defined in
src/helpers/event/recurringEventHelpers/createRecurrenceRule.ts:25