【发布时间】:2021-05-07 22:27:40
【问题描述】:
我正在尝试使用 Google 日历 API 方法 gapi.client.calendar.events.list 来检索日历上的事件现在。
我可以成功过滤开始日期和结束日期。但是,如果事件昨天开始并且仍在进行中,那么过滤今天开始的事情对我没有帮助。
var request = gapi.client.calendar.events.list({
'calendarId': 'my calendar id',
// shows things that have not yet started
'timeMin': (new Date()).toISOString(),
'showDeleted': false,
'singleEvents': true,
'orderBy': 'startTime'
});
我如何在日历上找到当前正在进行的事情的列表?
我(显然)希望避免提取一周的事件并对其进行解析。
【问题讨论】:
标签: javascript google-calendar-api google-api-js-client