Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Create a bad instance when creating a recurrence event using google calendar api

I use Google calendar api to create a recurrence event, it works, but create a instance at start date even if this date does not match recurrence rule.

Request URL: https://content.googleapis.com/calendar/v3/calendars/XXXXXXXXXXXXX8%40group.calendar.google.com/events?alt=json
Request Method: POST
Payload: {"start":{"dateTime":"2018-11-29T16:40:00.000Z","timeZone":"Europe/Berlin"},"end":{"dateTime":"2018-11-29T17:40:00.000Z","timeZone":"Europe/Berlin"},"summary":"myTitle","description":"my description","recurrence":["RRULE:FREQ=WEEKLY;UNTIL=20181202T164000Z;BYDAY=SU,SA"],"colorId":"1"}

Then in calendar I can see three events:

  • 2018-11-29 (Thuesday) -> bad. it is not Saturday or Sunday.
  • 2018-12-1 (Saturday) -> ok.
  • 2018-12-2 (Sunday) -> ok.

Why it creates an instance on Thuesday?

One posible solution is calculate the fist instance date and send this as start date, but i do not like it.

When I create this recurrence event in Google calendar page, it works fine.

Form Data
dates: 20181129T160000/20181129T170000
recur: RRULE:FREQ=WEEKLY;UNTIL=20190309;BYDAY=SU,SA

Thank you.

Comments