From: Klaus Stein Date: 2010-11-25T17:20:45+09:00 Subject: Re: date of 1 year ago zuerrong wrote: > > How does ruby get the date of 1 year ago? > like the result of with shell command: > > date -d '1 year ago' > Lets use the Date class: d = Date.today onyearago = Date.civil(d.year-1, d.month, d.day) puts onyearago.asctime Have fun! Klaus -- http://lapiz.istik.de/ The Answer is 42. And I am the Answer. Now I am looking for the Question.