Determing dates for next week

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?

Kurt

Hi,

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?

require ‘date’
true
d = Date.today
#<Date: 2452572,2299161>
d.to_s
“2002-10-24”
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
#<Date: 2452572,2299161>

HTH,

Bill

···

From: “Kurt V. Hindenburg” khindenburg@cherrynebula.net