2
votes

I'm using a Google Chrome extension to add events to Google Calendar. This is the format of a sample event:

{
  "summary": "CS XXXXX LE1",
  "location": "XXXXX Hall 210",
  "description": "XXXXXX Systems\nInstructor: XXXXXX",
  "start": {
    "dateTime": "2018-01-08T08:30:00-05:00",
    "timeZone": "America/New_York"
  },
  "originalStartTime": {
    "dateTime": "2018-01-08T08:30:00-05:00",
    "timeZone": "America/New_York"
  },
  "end": {
    "dateTime": "2018-01-08T09:20:00-05:00",
    "timeZone": "America/New_York"
  },
  "recurrence": [
    "RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;INTERVAL=1;UNTIL=2018-04-28T04:00:00.000Z"
  ]
}

This is supposed to create an 8:30-9:20 AM class repeating on Monday, Wednesday and Friday, starting from Jan 08 to April 28. However, it's only creating the event for Jan 08, and not the specified period. What's going wrong here? I am following the recommended format.


When I manually create this event in Google Calendar and fetch the data programmatically, I'm getting the following recurrence string:

"RRULE:FREQ=WEEKLY;UNTIL=20180428T035959Z;BYDAY=MO,WE,FR"

But, when I use that same string to create the event, it creates it for only the first Monday (Jan 08). I'm at a complete loss.

1

1 Answers

0
votes

Check the Creating recurring events:

The correct format would be:

}
      "summary": "Appointment",
      "location": "Somewhere",
      "start": {
        "dateTime": "2011-06-03T10:00:00.000-07:00",
        "timeZone": "America/Los_Angeles"
      },
      "end": {
        "dateTime": "2011-06-03T10:25:00.000-07:00",
        "timeZone": "America/Los_Angeles"
      },
      "recurrence": [
        "RRULE:FREQ=WEEKLY;UNTIL=20110701T170000Z",
      ],
      "attendees": [
        {
          "email": "attendeeEmail",
          # Other attendee's data...
        },
        # ...
      ],
    }

However, looking at your sample, you have extra details. Follow the official sample first.