You cannot add a multi-day, all-season event that spans several days through the CalendarApp class. You must do this using the calendar API through the advanced Google services.
1) Enable the calendar API for the script On the google scripts page, go to the menu item "Resources" → "Google Advanced Services". Enable the calendar API (currently v3).
2) Enable the service through the Google API Console On the "Advanced Google Services" page, click on the link to the API console. Click "+ Enable API." Select the Calendar API, then enable it.
3) Use the code snippet below (which creates a two-day gap, an all-day event) as an example
var calId = '##########################@group.calendar.google.com'; var event = { "summary":"Summary", "location":"Location", "description":"Description", "start":{ "date":"2017-06-03" }, "end":{ "date":"2017-06-05" } }; Calendar.Events.insert(event,calId);
You will notice that the above code will generate an event throughout the day from June 3 to June 4 (the end date is essentially 2017-06-05T00: 00: 00).
There are other event properties that you can add, some documented on the Calendar API / Events / insert page. Using Calendar.Events.list to get a list of events will give you an idea.
If you look at calendar API events, you will notice that there are many matches to the iCal specification.
source share