dog
dog

Reputation: 410

Google Calendar JSON API: Full-day events always one day longer

Since recently the JSON API always seems to add a day when returning the timespan for full-day events.

Display in Google Calendar Web app: display of event in calendar

enter image description here

Yet what the JSON API returns is this:

{
"kind": "calendar#event",
"etag": "\"2896554426340000\"",
"id": "...",
"status": "confirmed",
"htmlLink": "https://calendar.google.com/calendar/event?eid=...",
[...]
"summary": "...",
[...]
"start": {
  "date": "2016-02-01"
},
"end": {
  "date": "2016-02-02"
},
[...]
"iCalUID": "[email protected]",
"sequence": 0
}

Upvotes: 0

Views: 908

Answers (1)

luc
luc

Reputation: 3782

In the Calendar API the start is inclusive and the end is exclusive. That's why the end will be the next day (which is excluded).

Upvotes: 2

Related Questions