Jeremy Hinegardner wrote: > Well this has been answered fully now, but just for fun, how about the > fully gem driven method: > > % cat last_sun_jan.rb > require 'rubygems' > require 'chronic' > require 'facet/times' > require 'facet/time/to_date' > > last_sunday_in_jan = (Chronic.parse("1st Sunday in February", > :context => :future) - 7.days).to_date > > puts last_sunday_in_jan > > % ruby last_sun_jan.rb > 2008-01-27 That is really cool, Jeremy, except that the last Sunday in January is the 28th, not the 27th. Other than that, cool stuff! :) -- Posted via http://www.ruby-forum.com/.