问题
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:
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": "...@google.com",
"sequence": 0
}
回答1:
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).
来源:https://stackoverflow.com/questions/34992747/google-calendar-json-api-full-day-events-always-one-day-longer