Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Events.RecurrenceEnd.NewWithEndDate

Creates a recurrence end with a specific end date.

Component Version macOS Windows Linux Server iOS SDK
Events 6.2 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "Events.RecurrenceEnd.NewWithEndDate"; EndDate )   More

Parameters

Parameter Description Example
EndDate The new end date as timestamp or date. Get(CurrentHostTimeStamp) + 3600

Result

Returns recurrence end ID or error.

Description

Creates a recurrence end with a specific end date.
EKRecurrenceEnd is an attribute of EKRecurrenceRule that defines how long the recurrence is scheduled to repeat. The recurrence can be defined either with a number that indicates the total number times it repeats, or with a date, after which it no longer repeats. An event which is set to never end should have its EKRecurrenceEnd set to empty. If the end of the pattern is defines with a date, the client must pass a valid date. If the end of the pattern is defined as terms of a number of occurrences, the occurrenceCount passed to the initializer must be positive, it cannot be 0.

Examples

Create a recurrence rule with end date for a yearly event:

Set Variable [ $rule ; Value: MBS( "Events.RecurrenceRule.NewWithFrequency"; "Yearly";"1" ) ]
Set Variable [ $end ; Value: MBS( "Events.RecurrenceEnd.NewWithEndDate"; Date ( 12 ; 30 ; 2025 ) ) ]
Set Variable [ $r ; Value: MBS( "Events.RecurrenceRule.SetRecurrenceEnd"; $rule; $end ) ]
Set Variable [ $r ; Value: MBS( "Events.Item.AddRecurrenceRule"; $item; $rule ) ]

See also

This function checks for a license.

Created 10th March 2016, last changed 1st November 2020


Events.RecurrenceEnd.EndDate - Events.RecurrenceEnd.NewWithOccurrenceCount