Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Outlook Calendar REST API Recurrence Object

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).

like image 988
superphonic Avatar asked Oct 31 '22 01:10

superphonic


1 Answers

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:

enter image description here

Ant the code above is that the appointment will occur at Thursday of third week every two month.

Update

enter image description here

like image 89
Fei Xue - MSFT Avatar answered Nov 08 '22 08:11

Fei Xue - MSFT