Incorrect parsing of RecurrenceRule back-end

We need to parse and calculate the recurrence instances back-end, but we've noticed that our rule generates incorrect dates.

We are using the Recurrence Helper class from this knowledge base article:
https://www.syncfusion.com/kb/10009/how-to-parse-the-recurrencerule-at-server-side

The rule we are trying to parse is: FREQ=MONTHLY;BYDAY=WE;BYSETPOS=5;INTERVAL=1

Meaning, we want an appointment on the last Wednesday of every month.

When we use the above mentioned helper class we get incorrect dates, such as 2020-11-04, which is the first Wednesday of November.
If we use the rule in our Schedule the appointments are calculated correctly, so there's an issue when parsing in the helper class.
Is there a newer version of the helper class available which haven't been made public?





7 Replies 1 reply marked as answer

BS Balasubramanian Sattanathan Syncfusion Team November 17, 2020 01:31 PM UTC

Hi Toke, 

Greetings from Syncfusion Support 

We have analyzed your reported problem at our end and let you know that if you want an appointment on the last Wednesday of every month, you have to pass the following recurrence rule “FREQ=MONTHLY;BYDAY=WE;BYSETPOS=-1;INTERVAL=1;”. Since the dates are creating properly at our end. 

Output: 
 


Kindly try the above shared rule and let us know if you need further assistance. 

Regards, 
Balasubramanian S 



TW Toke Wivelsted November 18, 2020 07:15 AM UTC

The sample provided is using EJ2, we are using EJ1.

I just tested with the newest EJ1 version (18.3.0.47), the recurrence rule generated by the scheduler recurrence editor is: FREQ=MONTHLY;BYDAY=WE;BYSETPOS=5;INTERVAL=1
If we can not use the RecurrenceHelper class from that knowledge base article, is there another EJ1-specific helper class we can use?


BS Balasubramanian Sattanathan Syncfusion Team November 20, 2020 03:47 PM UTC

Hi Toke, 

Thanks for your patience. 

We have checked the reported scenario and let you know that we could reproduce the problem at our end. So we have resolved the problem in the below sample and suggest you to use the below updated RecurrenceHelper. 


Kindly try the above sample and let us know if you need further assistance. 

Regards, 
Balasubramanian S 


Marked as answer

TW Toke Wivelsted November 23, 2020 02:01 PM UTC

Thank you, we will use this and report back if we find any problems.


NR Nevitha Ravi Syncfusion Team November 24, 2020 03:49 AM UTC

Hi Toke, 

You are welcome, please let us know if you face any problem. We will always happy to assist you. 

Regards, 
Nevitha 



MM muhammad maddy October 24, 2024 07:13 AM UTC

can we also get the end date of the occurrence




SR Swathi Ravi Syncfusion Team October 25, 2024 12:58 PM UTC

Hi Muhammad maddy,

We have branched a new forum for your query. Kindly follow the below forum for further updates.


Regards,
Swathi

Loader.
Up arrow icon