Refactor date methods