Muhammed Basil
Muhammed Basil

Reputation: 1834

How to fetch calendar data for a particular date in Google calendar API v3?

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.

Upvotes: 7

Views: 3898

Answers (2)

Carsten Jonstrup
Carsten Jonstrup

Reputation: 41

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);

Upvotes: 3

Rick Jolly
Rick Jolly

Reputation: 3009

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

Upvotes: 10

Related Questions