I have an array of Ruby Date objects. How can I find the most recent datetime and the oldest datetime?
thanks
You have a comparison operator:
http://www.ruby-doc.org/core/classes/Date.html#M000673
Sort it.
date_array.min # => Oldest date_array.max # => Most recent