Refactoring date fields