问题
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?
回答1:
Ok i got the answer. The new parameters in Google API V3 are timeMin
& timeMax
to filter events between 2 dates.
回答2:
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');
For further reference see: Retrieve events occuring between a date range
Hope this helps.
来源:https://stackoverflow.com/questions/15516985/get-calendar-events-between-two-dates