Unplanned
Last Updated: 04 Aug 2022 08:48 by Holger
Holger
Created on: 04 Aug 2022 08:48
Category: Scheduler
Type: Bug Report
2
Recurrence Event not including last occure

Hi,

I have a recurrent event with the following dates:

"Start": "2022-08-01T07:00:00",
"End": "2022-08-01T08:00:00",
"RecurrenceRule": "FREQ=DAILY;UNTIL=2022-08-04T05:00:00"

https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 says:

The UNTIL rule part defines a DATE or DATE-TIME value that bounds the recurrence rule in an inclusive manner.  If the value  specified by UNTIL is synchronized with the specified recurrence, this DATE or DATE-TIME becomes the last instance of the recurrence.  The value of the UNTIL rule part MUST have the same value type as the "DTSTART" property

I generated the events with Thunderbird, synchronized to the caldav-Server and read it from there. 

In the Telerik Scheduler I got only 3 occurences of the event: from the 1st to the 3rd.

In Thunderbird I got 4. From the 1st to the 4th. According with the RFC, Thunderbird is right :-) 

----------------------- ADMIN EDIT -----------------------

The recurrence generation currently considers the time in the recurring rules. To workaround the issue, you should manually change the until parameter to contain the maximum possible hour, minute and second for the day. Here is an example:

 

// item is your appointment item

var rule = RecurrenceRule.Parse(item.RecurrenceRule); if(rule.Until.HasValue) { var untilDate = rule.Until.Value; rule.Until = new DateTime(untilDate.Year, untilDate.Month, untilDate.Day, 23, 59, 59); } item.RecurrenceRule = rule.ToString();

 

 

--------------------------------------------------------------------

0 comments