def xldate_from_time_tuple(time_tuple):
 (hour, minute, second) = time_tuple
 if ((0 <= hour < 24) and (0 <= minute < 60) and (0 <= second < 60)):
  return (((((second / 60.0) + minute) / 60.0) + hour) / 24.0)
 raise XLDateBadTuple(('Invalid (hour, minute, second): %r' % ((hour, minute, second),)))

def xldate_from_time_tuple ( time_tuple ) : ( hour , minute , second ) = time_tuple if ( ( 0 <= hour < 24 ) and ( 0 <= minute < 60 ) and ( 0 <= second < 60 ) ) : return ( ( ( ( ( second / 60.0 ) + minute ) / 60.0 ) + hour ) / 24.0 ) raise XLDateBadTuple ( ( 'Invalid (hour, minute, second): %r' % ( ( hour , minute , second ) , ) ) )
create an excel date from a tuple of .