More refactoring on the date method.