Expanding the reocurance rule ???.

2 posts, 0 answers
  1. Philip
    Philip avatar
    69 posts
    Member since:
    Mar 2016

    Posted 18 Apr 2016 Link to this post

    I need to be able to understand how the occurance rule works in the db as I need to be able to extract them to be able to create shift patterns.


    01.//Creating a Weekly Recurrence rule
    02.int interval = 2;
    03.RecurrenceRange range = new RecurrenceRange();
    05.range.Start = Convert.ToDateTime(rdStartShift.SelectedDate);
    06.range.EventDuration = TimeSpan.FromMinutes(30);
    07.range.MaxOccurrences = 3;
    08.RecurrenceDay recurrenceDay = RecurrenceDay.Wednesday;
    09.// _shifts.RecurrenceRule = new WeeklyRecurrenceRule(interval, recurrenceDay, range).ToString();
    10.DayOfWeek startDayOfWeek = DayOfWeek.Tuesday;
    11._shifts.RecurrenceRule = new WeeklyRecurrenceRule(interval, recurrenceDay, range, startDayOfWeek).ToString();

    I need be able expand this data to add to a list of shifts so that i can set them in the calendar as the start time and end time of an angents shift. So I guess question is how do i expand the recurrance ruel.
  2. Nencho
    Nencho avatar
    1876 posts

    Posted 21 Apr 2016 Link to this post

    Hello Philip,

    The recurrence rule that we use is the standard one and more information on the matter could be found here:

    Indeed the implementation, usage, extension and the overall work with the Recurrence Rule is quite tricky. However I would suggest you to refer to the following forum thread as well, where a colleague of mine had provided a sample example on how this rule could be parsed and used:


    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top