You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered Runt this week while trying to implement an iCalender type recurring event in a Rails application. I see were the icalendar tests where included, but many test would not work because of lack support for negative mday range.
I'm not very proficient in Ruby, but I attacked the problem by overwriting the REMonth include? method to support negative ranges (which you accept, but don't work)
I couldn't get the tests to run (didn't clone Runt), but this patch seems to work.
# from icalendar test 18start_date=DateTime.parse("US-Eastern:19970930T090000")#Sep 30, 1997end_date=start_date + 365#Sep 30, 1998test_date=DateTime.parse("US-Eastern:19971031T090000")#Oct 31#rrule = RecurrenceRule.new("FREQ=MONTHLY;COUNT=10;BYMONTHDAY=1,-1")te=REMonth.new(1) | REMonth.new(-1)#first and last days of the monthresults=te.dates(DateRange.new(start_date,end_date),10)
I did notice that if I used Time instead of DateTime and got an error:
results = te.dates(DateRange.new(start_date, end_date), 10)
TypeError: can't iterate from Time
I just have to watch that when I actually try to do something.
The text was updated successfully, but these errors were encountered:
I discovered Runt this week while trying to implement an iCalender type recurring event in a Rails application. I see were the icalendar tests where included, but many test would not work because of lack support for negative mday range.
I'm not very proficient in Ruby, but I attacked the problem by overwriting the REMonth include? method to support negative ranges (which you accept, but don't work)
I couldn't get the tests to run (didn't clone Runt), but this patch seems to work.
I did notice that if I used Time instead of DateTime and got an error:
I just have to watch that when I actually try to do something.
The text was updated successfully, but these errors were encountered: