How do I get calendar data for a specific date in the Google Calendar v3 API?

How to get calendar data for a specific date in Google Calendar API v3? The parameters timeMax and timeMin are compared with the created date of the event, and not with the date the event occurred.

+7
source share
2 answers

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

+9
source

Php example

$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); 
+1
source

All Articles