Add method to convert date object to time object.