would like to know how to get the recurring events for SharePoint calendar from SharePoint hosted app. There is an option to get normally using SPServices. But problem is we cannot use SPServices in SharePoint hosted app. I am stucking at below points:
For weekly events which are recurring for every 2 or 3 weeks on specified weekdays like Sunday, monday etc.
In above scenario how to calculate every 2 or 3 weeks dates based on starting event date.
I am using to get the recurrence data as following. It is giving me in xml string. based on that I am planning do calculations. I am able to successfully populate data for daily recurring events. But weekly it is problematic. monthly i haven't started yet.
appWebUrl +"/_api/SP.AppContextSite(@target)/Web/Lists/getByTitle('" + listTitle + "')/items(" + itemId + ")/RecurrenceData?@target='" + hostWebUrl + "'",
I am getting data as below
<recurrence><rule><firstDayOfWeek>su</firstDayOfWeek><repeat><weekly su="TRUE" mo="TRUE" tu="TRUE" we="TRUE" weekFrequency="1" /></repeat><repeatInstances>10</repeatInstances></rule></recurrence>
Now how to extract the dates based on above xml string?