Skip to main content

talawa-api / Exports / helpers/event/recurringEventHelpers/getRecurringInstanceDates

Module: helpers/event/recurringEventHelpers/getRecurringInstanceDates

Table of contents

Functions

Functions

getRecurringInstanceDates

getRecurringInstanceDates(recurrenceRuleString, recurrenceStartDate, eventEndDate, queryUptoDate?): Date[]

This function generates the dates of recurrence for the recurring event.

Parameters

NameTypeDefault valueDescription
recurrenceRuleStringstringundefinedthe rrule string for the recurrenceRule.
recurrenceStartDateDateundefinedthe starting date from which we want to generate instances.
eventEndDatenull | Dateundefinedthe end date of the event
queryUptoDateDaterecurrenceStartDatethe limit date to query recurrenceRules (To be used for dynamic instance generation during queries).

Returns

Date[]

Dates for recurring instances to be generated during this operation.

Remarks

The following steps are followed:

  1. Get the date limit for instance generation based on its recurrence frequency.
  2. Get the dates for recurring event instances.

Defined in

src/helpers/event/recurringEventHelpers/getRecurringInstanceDates.ts:23