From: joep Date: 2007-09-11T02:55:04+09:00 Subject: Re: Time question On Sep 10, 12:59 pm, Rob Biedenharn wrote: > On Sep 10, 2007, at 12:25 PM, joep wrote: > > > > > > > I am writing a small piece that will include a date that needs to be > > compared to the current time. > > > EX. a = Time.now > > b = db_cert_date + (72 months) > > > if(a < b) > > do something > > elsif(a > b) > > do something else > > else > > do this > > end > > > I am looking for the best way to add 72 months onto an old date and > > then compare it with the current date. Does anyone have any ideas? > > > Thanks in advance > > If db_cert_date was a Date, you could do: > > b = db_cert_date >> 72 > > -Rob > > Rob Biedenharn http://agileconsultingllc.com > R...@AgileConsultingLLC.com- Hide quoted text - > > - Show quoted text - Thanks Rob. This did work quite the way I wanted it to but I think with a little playing around I can get it. Thanks for the direction.