I think this could still be more efficient. For example, if the current_date is between the start and end date, but does not appear in the date series. Then we would iterate through all of the values looking for a value that is not there. What would be better is if we break out of the loop if we pass the date we're looking for.