added to_format method to time