Nicolás Avendaño Chung3,413 Points
Why is this not working?
I didn't understand what treehouse what telling me to do but i thought this could work, but it didn't
import datetime starter = datetime.datetime(2015, 10, 21, 16, 29) def delorean(intege): return datetime.datetime.combine(starter + intege)
The combine method typically looks like this
def time_tango (some_date, some_time): return datetime.datetime.combine(some_date,some_time)
my_date= datetime.datetime.date(datetime.datetime.now()) my_time = datetime.datetime.time(datetime.datetime.now()) print(time_tango(my_date,my_time))
check it out ... and if this answers your question, please mark the question as answered.
You shouldn't be using
combine, but instead be adding a
timedelta based on the
integer to the
return starter + datetime.timedelta( ... )
Keep in mind that the
timedelta takes a number of days, not hours, so you'll need to adjust
integer by a particular amount when passing it to the