davepar / gcalendarsync

Apps Script for syncing a Google Spreadsheet with Google Calendar
MIT License
161 stars 46 forks source link

Pulling More Than 1 Year From the Calendar #35

Closed tjhuntley1 closed 6 years ago

tjhuntley1 commented 6 years ago

I sat the script as this:

// Configure the year range you want to synchronize, e.g.: [2006, 2017] var years = [2018];

but it is pulling events from Jan 2018 until June 2020. Is there a way to get it to pull one year?

Note: This wouldn't be a problem except when I pull it into the spreadsheet I have 2 or 3 of the same events for yearly recurring events. It will show up the 1st sync and 2nd sync it will clear the 2018 events and the first half of the year of 2019 events and leave July 2019-June 2020 events. It would be better to have a fix for this rather the former.

davepar commented 6 years ago

You'd need to set years to something like [2018, 2018] to pull just the one year. The way you had it, I think the end year defaults to far in the future.

Alternatively, I just made a change to the script to make it more clear what the begin/end dates are.