Refactored out date helpers into a common class