7
votes

How to fetch calendar data for a particular date in Google calendar API v3 ? In parameters, timeMax and timeMin compares with created date of an event not with the date of occurrence of an event.

2

2 Answers

10
votes

timeMin and timeMax work based on the event date for me. I'm using the api url for events > list. You can run a live test to verify on the google calendar api docs for events > list at the bottom of the page. Keep in mind that the date format should be yyyy-mm-ddT00:00:00+00:00

3
votes

Example in php

$cal = new Google_Service_Calendar($client);
$optParams = array('timeMax' => '2014-12-03T23:59:59+00:00','timeMin' => '2014-12-02T00:00:01+00:00');

$events = $cal->events->listEvents('primary',$optParams);