From: YANAGAWA Kazuhisa Date: 2005-04-28T22:13:04+09:00 Subject: Re: Newbie question: Simple Ruby Date Question In Message-Id: <1114639618.103794.222300@o13g2000cwo.googlegroups.com> "mattscape" writes: > What would be a nice ruby way to write this? Rather functional than rubyish though.... (Date.new(month.year, month.month, 1)..Date.new(month.year, month.month, -1)).select {|d| (1..5).include?(d.wday)} is sufficient? Date has instance method succ, so can generate Range, then we can use Enumerable#select for filtering elements in the Range. -- kjana@dm4lab.to April 28, 2005 Translators, traitors.