From: Todd Benson Date: 2008-03-01T16:55:58+09:00 Subject: Re: making a monthly calendar... On Sat, Mar 1, 2008 at 1:51 AM, Todd Benson wrote: > On Fri, Feb 29, 2008 at 4:30 PM, Mikkel Bruun wrote: > > anyone who have a quuck solution??? > > > > thanks!! > > > > mikkel > > Here's one for fun. I'm pretty sure you don't want to use this (for > all I know, you might be laughed out of the room :), but it > demonstrates some methods... [snip beginning code] > c = (-1..1).inject([]) {|a, i| a << (t.month + i)}.map {|i| > 1..Date.new( t.year, i, -1 ).day}.map {|i| i.to_a} That is supposed to be one line, just so you know, if your reader didn't pick it up right. Todd