Make the max_date() helper function accept *dates as argument
so it can be called with more than 2 dates.