How do you check whether a date is in a date range?
We all know (start_date..end_date).include?(this_date) is quite slow. If you have seen Ben Orenstein’s talk about refactoring, you might know (…).cover? is much faster… but is it fast enough?
We all know (start_date..end_date).include?(this_date) is quite slow. If you have seen Ben Orenstein’s talk about refactoring, you might know (…).cover? is much faster… but is it fast enough?
Post a comment