= private = protected
between?(min, max)
This method has no description. You can help the Ruby on Rails community by adding new notes.
# File activesupport/lib/active_support/time_with_zone.rb, line 189 def between?(min, max) utc.between?(min, max) end
You can check a date resides between two dates.
Date.today.between?(Date.yesterday, Date.tomorrow)
will return true
Date.yesterday.between?(Date.today, Date.tomorrow)
will return false
Have look how #between? handle adge case. It’s different from DateTime’s.
Date.yesterday.between?(Date.yesterday, Date.tomorrow) => true Date.tomorrow.between?(Date.yesterday, Date.tomorrow) => true