user94154 user94154 - 5 months ago 44
Ruby Question

Get the newest and oldest date from a list - Ruby

I have an array of Ruby Date objects. How can I find the newest datetime and the oldest datetime?

Answer
date_array.min # => Oldest
date_array.max # => Most recent