#NEWLINE# def __get_previous_period( time ) : #NEWLINE# #INDENT# last_period = ( time - datetime . timedelta ( days = 1 ) ) #NEWLINE# start = datetime . datetime ( year = last_period . year , month = last_period . month , day = last_period . day ) #NEWLINE# end = datetime . datetime ( year = time . year , month = time . month , day = time . day ) #NEWLINE# return ( start , end )