I have an array of Ruby Date objects. How can I find the newest datetime and the oldest datetime?
date_array.min # => Oldest
date_array.max # => Most recent
oldest, newest = date_array.minmax
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With