Google Calendar

If you look to the right (on the main page) you’ll see my upcoming events.
This is my first attempt at playing with the Google Calendar API. It wasn’t as easy as some of the others I’ve used, and a lack of any real PHP code made it harder.
For some reason the XML files return different date formats depending on the type of event. For short one day meetings I get a start and end time inside a <gd:when /> tag down to the nearest millisecond. For all day events I just get the Year-Month-Day. For reoccurring events, a completely different set of data is returned inside <gd:recurrence /> tags, one day events have start and end times, whilst hourly events have a start time and a duration.
It also only shows the last 25 modified events (although you can search by date ranges), so if I enter an event a year in advance it may not show up.
Maybe if a GData library is available for PHP it’ll be easier, but at the moment my nasty hacky code seems to work.

Leave a Reply

Your email address will not be published.

Human test: Enter Ryan backwards