I am using an onEdit trigger to trigger a Google Apps Script. Essentially, I am using the results of a Form to populate a calendar event. Once I've created the calendar event, I want to be able to keep it in sync with the form entry. So if someone edits the form data, I want to edit the calendar event. Unfortunately, since there is no getEventById storing the eventId is not enough.
I was thinking I might be able to use the event['oldValue'] which stores the event time to figure out when the event used to be (in case it changes) to get a list of events at that time which will allow me to iterate through a small number of events to find the calendar event.
Unfortunately, the date object comes out as a weird floating point number that I can't parse. e.g: 1/19/2016 20:00:00 comes out as 42388.791666666664 which I really don't understand.
I did have another thought, should I just use a regular HTTP get call to get the event I want? I'm not exactly sure how to do that from within a Google Apps Script