Refactoring next collection calculation code to fix bug when checking on the day of a collection that has been changed