Getting calendar events between two dates

How to get all events between two specific dates. For example, I want to receive events only between 1st of March 2013 and 28th of March 2013 .

I am using the Google Calendar API v3. Whereas in Google Calendar API v1 there was a search tool between two dates using start-min and start-max. I am wondering what is the replacement of these two parameters in the Google Calendar API v3?

+8
google-calendar google-api google-api-php-client
source share
2 answers

Ok, I got an answer. New parameters in Google API V3: timeMin and timeMax for filtering events between two dates.

+15
source share

Just add these two parameters to the request before receiving the event feed:

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

For more information, see Retrieving Events Between a Date Range.

Hope this helps.

0
source share

All Articles