Google Calendar JSON API:全天活动通常会延长一天 [英] Google Calendar JSON API: Full-day events always one day longer

查看:187
本文介绍了Google Calendar JSON API:全天活动通常会延长一天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从最近开始,JSON API似乎总是在返回全天事件的时间间隔时增加一天.

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

在Google日历网络应用中显示:

Display in Google Calendar Web app:

但是JSON API返回的内容是这样的:

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
}

推荐答案

在Calendar API中,开始是包容性的,而结尾是排他性的.这就是为什么结局是第二天(不包括在内).

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

这篇关于Google Calendar JSON API:全天活动通常会延长一天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆