From: Peter Bailey Date: 2007-09-27T00:00:46+09:00 Subject: Re: Finding the last Sunday of a month Mohit Sindhwani wrote: > OK, I'm confused - is your budget fencepost the last Sunday or the > Sunday every 4 weeks from the end of Jan? > > Cheers, > Mohit. > 9/26/2007 | 10:56 PM. It's a 28-day cycle, like a lunar cycle. The last Sunday in January is the first fencepost, with the 1st budgetary period being from January 1 to that Sunday. Then, that Sunday is the first day of the 2nd budget period, and so on. But, I think I've got it now. My problem was my use of Time.now instead of DateTime.now. DateTime.now allows me to compare these budgetary dates with today's date. Thanks for everything. Cheers, Peter -- Posted via http://www.ruby-forum.com/.