2012-09-19 53 views

回答

2

一些代碼開始:

function myFunction() { 
    var calendarSource = CalendarApp.getCalendarById("calendarID"); 
    var calendarDestination = CalendarApp.getCalendarById("calendarID"); 
    var eventToCopy = calendarSource.getEvents(new Date("July 21, 2009 EST"), new Date("July 22, 2009 EST")); 

    //read up: https://developers.google.com/apps-script/class_recurrence 
    var newRecurrence = CalendarApp.newRecurrence().addWeeklyRule().times(10); 

    for (var i in eventToCopy){ 
    if (eventToCopy[i].getTitle() == "event name"){ 
     var newEvent = calendarDestination.createEventSeries(eventToCopy[i].getTitle(), eventToCopy[i].getStartTime(), eventToCopy[i].getEndTime(), newRecurrence); 
    } 

} 

這應該讓你開始,

相關問題