How to find the minimum of 2 DateTime objects in Rails?
The most rubyish way is to use
[a, b].min
but you could also use the C-style
(a > b)? b : a
Hope this helps!
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