@lru_cache()
def timedelta_to_days(value):
 if (not hasattr(value, 'total_seconds')):
  secs = ((value.microseconds + ((value.seconds + (value.days * SECS_PER_DAY)) * (10 ** 6))) / (10 ** 6))
 else:
  secs = value.total_seconds()
 return (secs / SECS_PER_DAY)

@ lru_cache ( ) def timedelta_to_days ( value ) : if ( not hasattr ( value , 'total_seconds' ) ) : secs = ( ( value . microseconds + ( ( value . seconds + ( value . days * SECS_PER_DAY ) ) * ( 10 ** 6 ) ) ) / ( 10 ** 6 ) ) else : secs = value . total_seconds ( ) return ( secs / SECS_PER_DAY )
return the time delta as a number of seconds .