Recurrence Calculation

Hi Syncfusion about the recurrence of SfSchedule how do I get a list the Last appointment DateTime. For Example: I schedule every three days with End After 2314 Recurrence?

Thanks..

3 Replies

DY Deivaselvan Y Syncfusion Team August 24, 2018 12:29 PM UTC

Hi Laurel,

Thank you for contacting Syncfusion support.

 
You can get the date time of last recurrence from the collection of recurrence appointment with end date using GetRecurrenceDateTimeCollection method of ScheduleHelper class. Kindly refer the below example and code snippet.   
  
Code snippet:  
        public static IEnumerable<DateTime> GetRecurrenceDateTimeCollection(stringRRule, DateTime RecStartDate, DateTime? specificStartDate = null, DateTime? specificEndDate = null 
        {  
            ...  
        }  
 
Where,
RRule - RRule of recurrence appointment.   
RecStartDate - Start date of recurrence appointment.   
specificStartDate - Optional parameter, can be passed to get the occurrences of recurrence appointment from specified start date of date ranges.   
specificEndDate - Optional parameter, can be passed to get the occurrences of recurrence appointment up to the specified end date of date ranges.   
  
Code snippet:  
            var recurrenceCollection = ScheduleHelper.GetRecurrenceDateTimeCollection(appointment.MappedRecursiveRule, appointment.MappedStartTime);  
  
  
Sample: SfSchedule  
  
Note:   
You can get the date time collection within the specific range when the recurrence appointments has no end date.  
  
Regards,   
Deivaselvan 



LJ Laurel Jay Fadul August 28, 2018 06:47 AM UTC

Ok, thanks..


DY Deivaselvan Y Syncfusion Team August 28, 2018 12:36 PM UTC

Hi Laurel,

We are happy to know that the given solution meets your requirement. Please let us know if you need any further assistance.

Regards,
Deivaselvan 


Loader.
Up arrow icon