Google Calendar PHP Retrieve events by specified date range -
I know that you can retrieve events for a specified date range, but I have a specified date (a Single day)?
I tried to set both the SetTestMin () and SetstartMax to the same date, but it is not working. It seems that there should be at least one day between Max and Max.
I'm using code here:
$ startDate = '2009-07- 23'; $ ENDDATE = '2009-07-23'; $ GdataCal = New Zend_Gdata_Calendar ($ customer); $ Query = $ gdataCal- & gt; New event (); $ Query-> SetUser ('default'); $ Query-> SetVisibility ('private'); $ Query-> SetProjection ('full'); $ Query-> SetOrderby ('StartTime'); $ Query-> SetStartMin ($ STARTDATE); $ Query-> SetStartMax ($ ENDDATE); $ EventFeed = $ gdataCal- & gt; GetCalendarEventFeed ($ query);
Any ideas? Thank you ...
EDIT:
No problem, I just got it:
"Note that while Startman is included, startMax is exclusive , So a startmax '2007-08-01' will include those events in 2007-07-31 11: 59: 59. "
To be marked as an answer to this question ...
While StartMin
is inclusive, StartMax
is unique, which means that the date set as StartMax
Will not be included in Ima. If you want to do one-day events, set StartMax
as the next day, such as:
// All for 2009-07-23 $ Get Event Query- & gt; SetStartMin ('2009-07-23'); $ Query-> SetStartMax ('2009-07-24');
Comments
Post a Comment