From: Bill Kelly Date: 2002-10-25T15:39:39+09:00 Subject: Re: Determing dates for next week Hi, From: "Kurt V. Hindenburg" > > Is there a simply way to find out the dates for the next week? For > example, if today is 10/25 (month/day), determine 10/26, 10/27, ..., > 11/01. > > I can do this in Perl though convert to Epoch seconds and back, but that > is kinda ugly. I suppose the same can be done in Ruby. Is there a > better/easier way? irb> require 'date' true irb> d = Date.today # irb> d.to_s "2002-10-24" irb> d.upto(d + 8) {|_d| puts _d} 2002-10-24 2002-10-25 2002-10-26 2002-10-27 2002-10-28 2002-10-29 2002-10-30 2002-10-31 2002-11-01 # HTH, Bill