Get the newest and oldest date from a list - Ruby
datetime, ruby, sorting
Solution
date_array.min # => Oldest
date_array.max # => Most recent
Problem
I have an array of Ruby Date objects. How can I find the newest datetime and the oldest datetime?
datetime, ruby, sorting
date_array.min # => Oldest
date_array.max # => Most recent
I have an array of Ruby Date objects. How can I find the newest datetime and the oldest datetime?