code: def _date_by_len(self, string):
          
  
          strlen = len(string)
  
          year_num = int(string[0:2])
          if year_num < 50:
              prefix = '20'
          else:
              prefix = '19'
  
          if strlen == 10:
              return datetime.strptime(prefix + string, '%Y%m%d%H%M')
  
          if strlen == 12:
              return datetime.strptime(prefix + string, '%Y%m%d%H%M%S')
  
          return string
docs: Parses a date from a string based on its length
  
          :param string:
              A unicode string to parse
  
          :return:
              A datetime.datetime object or a unicode string