Dates refactor