Julian Leviston wrote:
> You can use Date ranges. If you have strings, you'll need to Parsedate
> them into dates first. String ranges won't understand date overflow
> (ie how many days in a month, months in a year etc.).
>
> ((1.year.ago.to_date)..(Date.today)).to_a.map{|x| x.to_s(:db)}
>
> Julian
Thanks for your HELP.
can you explain with example Julian ?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---