0
A
回答
2
的getEvents()
的options
参数没有提供方法来搜索事件的客人名单。
这是一个函数,它将返回一个事件列表,该列表仅包含在来宾列表中包含指定电子邮件地址的事件。该功能也是available as a gist。
/**
* Gets all events that occur within a given time range,
* and that include the specified guest email in the
* guest list.
*
* @param {Calendar} calen Calendar to search
* @param {Date} start the start of the time range
* @param {Date} end the end of the time range, non-inclusive
* @param {String} guestEmail Guest email address to search for
*
* @return {CalendarEvent[]} the matching events
*/
function getEventsWithGuest(calen,start,end,guestEmail) {
var events = calen.getEvents(start, end);
var i = events.length;
while (i--) {
if (!events[i].getGuestByEmail(guestEmail)) {
events.splice(i, 1);
}
}
return events;
}
// Test function
function test_getEventsWithGuest() {
var calen = CalendarApp.getDefaultCalendar();
var now = new Date();
// then... four weeks from now
var then = new Date(now.getTime() + (4 * 7 * 24 * 60 * 60 * 1000));
var events = getEventsWithGuest(calen,now,then,'[email protected]');
Logger.log('Number of events: ' + events.length);
}
相关问题
- 1. 检索基于日期
- 2. Symfony活动日历
- 3. 如何检索当天的日历活动?
- 4. 关于日历和日历活动的问题
- 5. 基于日期检索记录
- 6. 检索基于当前日期
- 7. 检索日历条目TimeZone
- 8. 检索log4j的活动日志级别
- 9. 日历单击新活动
- 10. Appcelerator钛活动日历
- 11. Google日历活动创建
- 12. 基于可用日期的日历
- 13. 检索基于ID
- 14. Google日历:获取活动日期?
- 15. 如何检索Google日历中最近更新的所有活动?
- 16. 基于检索日期的递增日期
- 17. 与Google日历类似的日历活动条目
- 18. 安卓日历活动时同步删除谷歌日历
- 19. Google日历 - 从特定日历中获取活动
- 20. drupal中基于事件的日历
- 21. 基于日期的价格历史
- 22. Sharepoint 2010基于角色的日历?
- 23. 的GridView的ICS基于日历控件
- 24. 基于日历返回结果周
- 25. 基于RSS源填充日历
- 26. 检索基于使用SiebelDataBean
- 27. 活动链接基于URL
- 28. 检索已删除的日历事件?
- 29. 使用Matlab检索Outlook日历项目
- 30. 检索日历事件条目信息