davepar / gcalendarsync

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

Change start point & omit cal -> spreadsheet #33

Closed ztucker closed 6 years ago

ztucker commented 6 years ago

Hello,

I am new to programming so apologies in advance for the stupid questions.

I have hundreds of entries that go back a few years, and I want to sync only the events from the current date forward. Is there any way to add that into the script so it doesn't start all the way back in 2016 or even for events that happened last week?

Also - I am only planning to use the script to sync spreadsheet to calendar. I do not need to sync from cal to SS. Are there parts of the script I can safely omit to declutter it without messing up the function?

Thanks so much!

davepar commented 6 years ago

I'll work on an update to make it easier to specify a particular start/end date, including the current date. Hopefully this weekend.

It would be fairly easy to remove the "from calendar" option from the menu. Just take out the first entry in the "menuEntries" array around line 46. Just be aware that you'll need to do that every time you update the script if you grab a new version in the future.

Dave

davepar commented 6 years ago

I just made a change that makes it easier to ignore any events in the past. Near the top of the script change the beginDate line to this: var beginDate = new Date().