gpt4 book ai didi

google-apps-script - 如何使用 Google Apps 脚本创建两天的 AllDay 事件?

转载 作者:行者123 更新时间:2023-12-01 02:24:45 25 4
gpt4 key购买 nike

我想使用 Google Apps 脚本 createAllDayEvent(title, date)创建一个全天谷歌日历,但只有一个日期参数,所以我只能创建一个全天谷歌日历。

现在我需要创建两天的 AllDay Google 日历(例如:从 2013 年 6 月 28 日到 2013 年 6 月 29 日),我该怎么办?

感谢帮助!

最佳答案

您需要使用 createAllDayEventSeries() ,它接受 Recurrence范围。

var recurrence = CalendarApp.newRecurrence().addDailyRule().times(2);
var eventSeries = CalendarApp.getDefaultCalendar().createAllDayEventSeries('My All Day Event',
new Date('June 28, 2013'),
recurrence,
{guests: 'everyone@example.com'});
Logger.log('Event Series ID: ' + eventSeries.getId());

关于google-apps-script - 如何使用 Google Apps 脚本创建两天的 AllDay 事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17400217/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com