require ''date''
d = Date.parse("Sept 1, 2008")
somedates = Array.new(8).map { |x| x = d += 7 }
10.times { puts "I <3 ruby" }
cheers
D
On Aug 29, 3:17 pm, infinteVerve
<merickson....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I was looking into the runt gem, but it''s obvious I''m a
total newb.
>
> I want to know if this is possible using runt, and if someone here is
> gracious enough to spell it our for a newbie.
>
> I''m trying to figure out how to use runt to calculate a set of
dates
> ( i.e. every monday starting on Sept 1, 2008, and repeating for, say,
> 8 weeks. ) and then passing those dates into an array named
> ''somedates'', for example.
>
> I realize this may be more of a Ruby than a RoR question. Any help is
> greatly appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---