Skip to content

Commit dd4c000

Browse files
Custom event filters (#443)
1 parent 2c88b06 commit dd4c000

File tree

3 files changed

+357
-152
lines changed

3 files changed

+357
-152
lines changed

Code.gs

+1-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ var sourceCalendars = [ // The ics/ical urls that you want to get
3333
];
3434

3535
var howFrequent = 15; // What interval (minutes) to run this script on to check for new events. Any integer can be used, but will be rounded up to 5, 10, 15, 30 or to the nearest hour after that.. 60, 120, etc. 1440 (24 hours) is the maximum value. Anything above that will be replaced with 1440.
36-
var onlyFutureEvents = false; // If you turn this to "true", past events will not be synced (this will also removed past events from the target calendar if removeEventsFromCalendar is true)
3736
var addEventsToCalendar = true; // If you turn this to "false", you can check the log (View > Logs) to make sure your events are being read correctly before turning this on
3837
var modifyExistingEvents = true; // If you turn this to "false", any event in the feed that was modified after being added to the calendar will not update
3938
var removeEventsFromCalendar = true; // If you turn this to "true", any event created by the script that is not found in the feed will be removed.
@@ -130,8 +129,6 @@ function uninstall(){
130129
deleteAllTriggers();
131130
}
132131

133-
var startUpdateTime;
134-
135132
// Per-calendar global variables (must be reset before processing each new calendar!)
136133
var calendarEvents = [];
137134
var calendarEventsIds = [];
@@ -157,9 +154,6 @@ function startSync(){
157154

158155
PropertiesService.getUserProperties().setProperty('LastRun', new Date().getTime());
159156

160-
if (onlyFutureEvents)
161-
startUpdateTime = new ICAL.Time.fromJSDate(new Date(), true);
162-
163157
//Disable email notification if no mail adress is provided
164158
emailSummary = emailSummary && email != "";
165159

@@ -259,4 +253,4 @@ function startSync(){
259253
// (the message text does not seem to be logged anywhere)
260254
throw new Error('The sync operation produced errors. See log for details.');
261255
}
262-
}
256+
}

0 commit comments

Comments
 (0)