Refactored DateTimeCreator class and added tests