From: Lloyd Linklater Date: 2007-09-27T01:29:07+09:00 Subject: Re: Finding the last Sunday of a month caveat time! If the first of the month is Sunday, my code does not work. Here is a working version: one_day = 86400 t = Time.gm(2008, 'jun', 1, 1, 1, 1) if t.wday == 0 t -= one_day end p (t - (one_day * t.wday)).day Someone else can golf it. -- Posted via http://www.ruby-forum.com/.