I'm struggling to define a date range in Ruby (2.6.3) that represents the range of dates up to a given date (in my examples it is Date.today):
BigDecimal("Infinity")...Date.today
*** ArgumentError Exception: bad value for range
nil...Date.today
*** ArgumentError Exception: bad value for range
Date::Infinity.new...Date.today
*** ArgumentError Exception: bad value for range
(Date.today...-Date::Infinity.new)
Fri, 31 May 2019...#
this one doesn't break, but also doesn't appear to give me a meaningful date range:
(Date.today...-Date::Infinity.new).include? Date.yesterday
false