Ruby Ranges ../… excluding ends

(Date.new(2020,1,1) .. Date.new(2020,1,10)).overlaps?(Date.new(2020,1,10) .. Date.new(2020,1,20))
=> true

(Date.new(2020,1,1) ... Date.new(2020,1,10)).overlaps?(Date.new(2020,1,10) ... Date.new(2020,1,20))
=> false

Leave a Reply

Your email address will not be published. Required fields are marked *