Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get list of the day events from Google Calendar

I can not figure out how to get a list of events of a particular day, no matter whether they started the day or before and are not over yet?

In this page https://developers.google.com/google-apps/calendar/v3/reference/events/list I've read about two optional parameters timeMax — upper excl. bound of start event time and timeMin — lower incl. bound of end event time. But the question is, How to set them in right way to get all events that happens at certain day, e.g. 2012-10-25

If i'm right, timeMax='2012-10-25T23:59:59Z' — gave me events that possibly starts from ? to this datetime timeMin='2012-10-25T23:59:59Z' — gave me events that ends this datetime

like image 866
Maxja Avatar asked Oct 23 '12 13:10

Maxja


People also ask

Can you export a list of events from Google Calendar?

Export events from one calendar You might need to click to expand it. Settings and sharing. Under "Calendar settings," click Export calendar. An ICS file of your events will start to download.

How do I see all day events in Google Calendar?

Agenda view Use the Agenda view to view all your events grouped by day. To display the Agenda view, click the Agenda button in the top-right corner of the calendar. To switch to the Day view (for any particular day), just click on a date displayed in the Agenda view.


1 Answers

Actually, I think this should be:

timeMin='2012-10-25T00:00:00Z' 
timeMax='2012-10-26T00:00:00Z' 

Since timeMax is exclusive in your example if you happen to have a calendar event on the 25th at 11:59:59pm you wouldn't retrieve it (rare, I know, but still possible).

This is how I've done it, even though now I'm running into another issue with retrieving calendar events.

like image 79
bvstone Avatar answered Jan 01 '23 22:01

bvstone