Hi,
Very nice catch! I didn't guess that the
google.gdata.DateTime.fromIso8601() method is very strict about
enforcing the entire datetime string to contain micro-second. Thanks
for the update!
Austin
On Wed, Apr 2, 2008 at 8:25 AM, CreativeLlama <[EMAIL PROTECTED]> wrote:
>
> excuse me. that should say milliseconds. the code works when you
> specify milliseconds.
>
>
>
>
> On Apr 2, 10:22 am, CreativeLlama <[EMAIL PROTECTED]> wrote:
> > So, for whatever reason, the code works when you specify seconds
> > (00:00:00.00) on the Max and Min times versus not specifying
> > (00:00:00). The PHP date function returns the ISO formatted date and
> > time, but does not include the seconds. When I re-wrote the code in
> > PHP to include seconds, everything shows up correctly:
> >
> > var startMin =
> > google.gdata.DateTime.fromIso8601('2007-01-01T00:00:00.00-00:00');
> > var startMax = google.gdata.DateTime.fromIso8601('<?php echo
> > (date('Y', time()).'-'.date('m', time()).'-'.date('d',
> > time()).'T00:00:00.00-00:00');?>');
> > query2.setMinimumStartTime(startMin);
> > query2.setMaximumStartTime(startMax);
> >
> > Before I found this answer, I had hard coded the dates without the
> > seconds included because that was the only difference between what my
> > hard coded startMin variable and my dynamically set startMax
> > variable. When I put the following in the code, it failed (notice the
> > absence of seconds included in the date/time):
> >
> > var startMin =
> > google.gdata.DateTime.fromIso8601('2007-01-01T00:00:00-00:00');
> > var startMax =
> > google.gdata.DateTime.fromIso8601(''2008-04-01T00:00:00-00:00');
> > query2.setMinimumStartTime(startMin);
> > query2.setMaximumStartTime(startMax);
> >
> > On Mar 31, 2:27 pm, "Austin (Google)" <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hi,
> >
> > > That's interesting 'cause I try what you have done and I can retrieve
> > > events without the start-max using the JS client library.
> >
> > > Since I cannot reproduce your problem, I am not sure why your code
> > > only retrieve events when start-max is specified. Let us know if you
> > > have other information. Thanks
> >
> > > Austin
> >
> > > On Mon, Mar 31, 2008 at 10:54 AM, CreativeLlama <[EMAIL PROTECTED]>
> wrote:
> >
> > > > I'm trying to get events for only a certain time period from my
> > > > calendar events feed, using Javascript and PHP. The events don't show
> > > > up in my webpage if I use the piece of PHP below. If I hard code
> > > > startMaxNow, the code works just fine. When I view the source code
> > > > via the web browser the date is formatted correctly. Any suggestions?
> >
> > > > var startMaxNow = '<?php echo date('c',time());?>';
> > > > var startMin =
> > > > google.gdata.DateTime.fromIso8601('2007-01-01T00:00:00.000-00:00');
> > > > var startMax = google.gdata.DateTime.fromIso8601(startMaxNow);
> > > > query2.setMinimumStartTime(startMin);
> > > > query2.setMaximumStartTime(startMax);
> >
> > > > Thanks!- Hide quoted text -
> >
> > > - Show quoted text -- Hide quoted text -
>
>
> >
> > - Show quoted text -
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---