Using the Application-Get-Next-Recurrence-Time command
The Application-Get-Next-Recurrence-Time command performs a recurrence date calculation by starting with the day after the start time and finding recurrence dates based on the specified recurrence definition name. The return value is a semicolon-separated list of dates (in seconds since epoch time).
The recurrence pattern specifies a day or days. The Application-Get-Next-Recurrence-Time takes the day or days specified by the recurrence pattern, and adds the starting time portion of the starting date and time to it to return a list of dates (in seconds since epoch time). For example, if a recurrence is defined as "Tuesday of every week" and the start time is 12/1/08 at 11:00 A.M. (a Monday), the value for 12/2/08 at 11:00 A.M. is returned. However, if the start time is 12/2/08 at 11:00 A.M. (a Tuesday), the value for 12/9/08 at 11:00 A.M. is returned.
The command syntax is as follows:
The options for these recurrence time calculations are as follows:
- <formName>—Form that contains the recurrence fields, such as the Business Time Segment form.
- <startTime>—The starting date and time from which the next recurring day is to be calculated.
- <recurrenceDefinitionName>—Identifier indicating the entry in the form (specified by <formName>) that contains the recurrence pattern to use for this calculation. This is the name in field 2300.
Following is an example of the command with $PROCESS$:
weekly is an entry in the form that contains the recurrence fields, such as the Business Time Segment form. The weekly entry is defined as Wednesday and Friday, every 3 weeks.
The return value is 1082136600, which corresponds to 4/16/04 10:30:00 AM. Calling Application-Get-Next-Recurrence-Time again with a start time of 04/16/04 10:30 AM returns 1083778200;1083951000, corresponding to 5/5/04 10:30:00 AM and 5/7/04 10:30:00 AM.