11
votes

How to get all events between two specific dates. For example i only want to get events between 1st of March 2013 & 28th of March 2013.

I am using Google Calendar API v3. While in Google Calendar API v1 there was the facility for search between 2 dates using start-min & start-max. I am wondering what is the replacement for these two parameters in Google Calendar API v3?

2

2 Answers

18
votes

Ok i got the answer. The new parameters in Google API V3 are timeMin & timeMax to filter events between 2 dates.

0
votes

Just add these two parameters to the query before getting the event feed:

// Start date from where to get the events
$query->setStartMin('2013-01-01');
// End date
$query->setStartMax('2013-03-20');

Hope this helps.