This pattern of creating an array, iterating over another array, and placing the elements of the second array in the first array is a common mistake (or "anti-pattern") in Ruby. We have an excellent blog post on it: http://robots.thoughtbot.com/iteration-as-an-anti-pattern

Can you refactor lines 36-40 so that you don't need to have a `due_dates` variable at all?