From: Ryan Davis Date: 2008-09-05T03:16:52+09:00 Subject: Re: [ANN] recurrence 0.1.0, Ruby library for recurring stuff On Sep 3, 2008, at 22:09 , EdvardM wrote: > Short example: > > require 'recurrence' > > first_of_june = [2008, 6, 1] > r = Recurrence.new(first_of_june, :every_other => :week, :until => > '2010-06-01') > > my_cal = MyCalendar.new_default > my_cal.each_day { |date| > time = Time.parse(date) # assuming date can be parsed with > Time.parse > puts 'Yay! today is the day!' if r.recurs_on?(time) > } shorter, more efficient example: require 'date' (Date.civil(2008, 6, 1)..Date.civil(2010, 6, 1)).step(14) do |d| puts d end > ** Set-like operations why? when would you need/want this? > ** Installation > rake gem > sudo gem install pkg/recurrence*.gem you're forgetting about rubyforge. you really should release real gems. http://www.rubyflow.com/items/666