def _convert_datetime_to_stata_type(fmt):
 if (fmt in ['tc', '%tc', 'td', '%td', 'tw', '%tw', 'tm', '%tm', 'tq', '%tq', 'th', '%th', 'ty', '%ty']):
  return np.float64
 else:
  raise ValueError(('fmt %s not understood' % fmt))

def _convert_datetime_to_stata_type ( fmt ) : if ( fmt in [ 'tc' , '%tc' , 'td' , '%td' , 'tw' , '%tw' , 'tm' , '%tm' , 'tq' , '%tq' , 'th' , '%th' , 'ty' , '%ty' ] ) : return np . float64 else : raise ValueError ( ( 'fmt %s not understood' % fmt ) )
converts from one of the stata date formats to a type in type_map .