Moved date conversion methods to model for ease of testing