Answers:
我已经可以使用这样的Google脚本来做到这一点。您可以对此进行更改,以查明要删除的日期等。
function delete_events()
{
var fromDate = new Date(2013,0,1,0,0,0);
var toDate = new Date(2013,0,4,0,0,0);
var calendarName = 'My Calendar';
// delete from Jan 1 to end of Jan 4, 2013 (for month 0 = Jan, 1 = Feb...)
var calendar = CalendarApp.getCalendarsByName(calendarName)[0];
var events = calendar.getEvents(fromDate, toDate);
for(var i=0; i<events.length;i++){
var ev = events[i];
Logger.log(ev.getTitle()); // show event name in log
ev.deleteEvent();
}
}
我发现了一个修改,如果您要查找某些事件,可以使此脚本值得。您有意或无意导入。可以说,很多条目的名称中都带有“ Cycle 1 Checkpoint 10”(循环1检查点),其后是数字或其他名称。建议您找到“循环1检查点10”,“循环1检查点20”,但找不到“循环1检查点10”。
function delete_events()
{
//take care: Date function starts at 0 for the month (January=0)
//{search: 'cycle'+"*"+'Checkpoint'} hier zijn de search terms
var fromDate = new Date(2014,7,1,0,0,0); //This is August 1, 2014
var toDate = new Date(2016,2,1,0,0,0); //This is March 1, 2016 at 00h00'00"
var calendarName = 'GuyForssman';
var calendar = CalendarApp.getCalendarsByName(calendarName)[0];
var events = calendar.getEvents(fromDate, toDate,{search: 'cycle'+"*"+Checkpoint'+"*"});
for(var i=0; i<events.length;i++)
{
var ev = events[i];
Logger.log('Item '+ev.getTitle()+' found on '+ev.getStartTime()); // show event name and date in log
//ev.deleteEvent(); //uncomment this line to actually do the delete !
}
}
从以前的日历系统迁移到Google Apps后,所有重复发生的事件都将分别导入。我在https://script.google.com上创建了一个新的Google脚本,并对其进行了修改,以仅删除某些事件(已经使用其他名称进行了新的重复事件)。
function delete_events()
{
//take care: Date function starts at 0 for the month (January=0)
var fromDate = new Date(2014,7,1,0,0,0); //This is August 1, 2014
var toDate = new Date(2016,2,1,0,0,0); //This is March 1, 2016 at 00h00'00"
var calendarName = 'your_calendar_name';
var toRemove = 'title_of_the_events';
var calendar = CalendarApp.getCalendarsByName(calendarName)[0];
var events = calendar.getEvents(fromDate, toDate,{search: toRemove});
for(var i=0; i<events.length;i++)
{
var ev = events[i];
if(ev.getTitle()==toRemove) //check if the title matches
{
Logger.log('Item '+ev.getTitle()+' found on '+ev.getStartTime()); // show event name and date in log
//ev.deleteEvent(); //uncomment this line to actually do the delete !
}
}
}
http://www.gcaltoolkit.com上有一个免费的API客户端。它具有1000个条目免费的网络版本,以及Windows和Mac可能免费的可下载版本。我尝试了一下,对我来说很快。
您可以按日期或搜索词进行选择,看起来您可以进一步对其进行手动修改。或者,只需单击要删除的内容。做出决定后,会有一个按钮可将您的更改提交回Google日历。
几分钟前,我遇到同样的问题时,我发现这非常有用,并且很惊讶地发现它不在这里。