Google Calendar feed timeMin timeMax not working

2019-05-21 08:50发布

I have inferred from my searches that the URI for a Google Calendar feed that limits the date range should include timeMin and timeMax and should also include singleEvents and orderBy. This is the URI that I've constructed:

https://www.google.com/calendar/ical/myuserid@gmail.com/public/full?singleEvents=true&orderBy=startTime&timeMin=2014-01-01T00:00:00&timeMax=2018-03-24T23:59:59

Regardless of what query parameters I put after the projection value, I still get back all events dating from 8/2008 through whatever future dates I have in the calendar.

I really am "constructing" this based on very little knowledge. Can anyone set me straight, please?

2条回答
可以哭但决不认输i
2楼-- · 2019-05-21 09:19

It also took me quite some trials and errors to realize that offset is actually mandatory, not optional, as documented in https://developers.google.com/google-apps/calendar/concepts

Try to add "Z" to the end of your URL:

https://www.google.com/calendar/ical/myuserid@gmail.com/public/full?singleEvents=true&orderBy=startTime&timeMin=2014-01-01T00:00:00Z&timeMax=2018-03-24T23:59:59Z

查看更多
贼婆χ
3楼-- · 2019-05-21 09:24

Mastoll, I think you are using calendar v3, is that right? You may try: https://www.google.com/calendar/ical/myuserid@gmail.com/public/full?singleEvents=true&orderBy=startTime&start-min=2014-01-01T00:00:00&start-max=2018-03-24T23:59:59&

You can try using start-min and start-max instead of timeMin and timeMax. This is the parameter for calendar v2, I don't why, but v2 parameter works for public calendar. You can also add the futureevents=true parameter. For the details information for v2, please refer to the following: https://developers.google.com/google-apps/calendar/v2/reference?hl=de&csw=1#Parameters

查看更多
登录 后发表回答