Last Updated: February 25, 2016
· sheerun

Don't use include? for checking if Date is in Range

Following will instantiate every date between start_date and end_date, and then check if date is in that set:


That could take a while. Instead use:


It uses >= and '<=' methods on Range boundaries.