Dates refactoring