This app was a class project I wrote to meet a specific need. I am maintaining a Google Calendar of Chicago area craft beer events for publication as a list of highlighted events on my blogs.
The problem was that the Google calendar had no easy way to select just the elements I needed from each calendar date array. My previous solution was to print a date range of event from Agenda view to a PDF, the copy the text into an editor, and kill a lot of lines. Taking what I have learned about APIs, I was able to use the form above that will query my Calendar for events within a certain date range, sort them chronologically, and show just the elements I wanted so I could easily copy and paste into a blog editing window.

A few notes on the building of the app:

  • GCal handles the dates for events set to “All Day” differently than for those with Start and End times, storing the time in different elements of the event’s array. I used a couple of “if” statements to work it out.
  • Since you need both a Start and End time, while I have many events for which a Start Time is given — presuming it ends when they close — I have set both the Start and End times for such events to be the same. Again, I used “If” statements to print the End Time — and the dash between — only if it’s different from the Start Time.
  • This form items above are set to input data in a DATE format instead of TEXT. In Chrome and Opera, for now, this causes the form to include a drop down calendar.

Revisions:

  • Dec. 9, '12: Fixed a search error that did not return events for the last day of the search range if they had a Start Time and it was after "00:00".
  • May 4, '13: Finally took an hour or three to figure how to put a default of "today" in the Start Date box. The default End Date is four days from today. You may change the search dates as you like.
  • Jan. 12, '18: Many little improvement in the last few years. Each location in the calendar now sports a Globe icon 🌎 that you can click for a Google map of the location. Most recently fixed so that multiple location will have their own little globe.

Future improvements and wish list:

  • Of course, this needs to be able to verify the dates input to assure they are in readable date format, etc.
  • I’d like to further tidy the output by printing the date only before the first item for it. And to show only the second “pm” if both the Start and End time are after noon. Well, that will come with time. In the meantime, this puppy is functional and being used.
  • Need to move this section to an "About" menu item. Also build it to look better on mobile devices.
If you’d like me to adapt this for your own use, let me know. You basically need your Google Calendar's ID, and the Authorization code string from Google.
Check out the published results on my Beeronaut Blog (Look for calendar articles)