I am retrieving Calendar events from Outlook365 using their RESTful API as document here https://msdn.microsoft.com/en-us/office/office365/api/calendar-rest-operations
When the event has a recurrence, instead of showing me an RRULE like every other Calendar in the world, I get a stupid object like this:
[Recurrence] => Array
(
[Pattern] => Array
(
[Type] => RelativeMonthly
[Interval] => 2
[Month] => 0
[DayOfMonth] => 0
[DaysOfWeek] => Array
(
[0] => Thursday
)
[FirstDayOfWeek] => Sunday
[Index] => Third
)
[Range] => Array
(
[Type] => NoEnd
[StartDate] => 2016-08-18
[EndDate] => 0001-01-01
[RecurrenceTimeZone] => GMT Standard Time
[NumberOfOccurrences] => 0
)
)
I can't find any documentation or spec on this. I need to convert this to an RRULE but I have no idea what values I might be getting and what they mean. The [pattern][type]
in the example above is RelativeMonthly
, which I think is what you get when the event occurs only in certain months?? the Type is Monthly
when it occurs each month, I think..??
Is there any documentation I am missing that explains the recurrence object that is returned from the Calendar API?
Or better yet a PHP script that already parses these in to an RRULE (longshot).
You can refer here for the document for the Recurrence. We can also use the Outlook UI of creating recurrent appointment to helpful understand the Recurrence object. Here is an figure for your reference:
Ant the code above is that the appointment will occur at Thursday of third week every two month.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With