Range

2 views
Skip to first unread message

Scott Taylor

unread,
Apr 8, 2010, 6:12:25 PM4/8/10
to gcal4ruby
I am trying to find calendar events. I have three events defined for
today. If I just use find that works fine. However, if I use a range
then nothing is found.

My code:

<% @cals.each do |calendar| %>
<% if calendar.title != "US Holidays" %>
<% events = GCal4Ruby::Event.find(calendar, '', {:range => {:start
=> Time.parse("04/08/2010"), :end => Time.parse("04/09/2010")}}) %>
<% for event in events %>
<%= event.title %> <%= event.where %> <%= event.start %><br>
<% end %>
<% end %>
<% end %>

Any ideas what is going on?

p.s. I also had to fix service.rb line 47 to work with Ruby 1.9
("@auth_token = ret.read_body.lines.to_a[2].gsub("Auth=", "").strip")
- I had to add ".lines" before to_a


--
Subscription settings: http://groups.google.com/group/gcal4ruby/subscribe?hl=en

Scott Taylor

unread,
Apr 8, 2010, 6:18:15 PM4/8/10
to gcal4ruby
Never mind. I figured out the dates are in European format (Day/Month/
Year) not US Format (Month/Day/Year) so I was misapplying the Ruby
Time function.
Reply all
Reply to author
Forward
0 new messages