docs: def _dateversion(self):
          # type: () -> int
          """Return the build/revision date as an integer "yyyymmdd"."""
          import re
          if self._head:
              ma = re.search(r'(?<=\()(.*)(?=\))', self._head)
              if ma:
                  s = re.split(r'[, ]+', ma.group(0))
                  if len(s) >= 3:
                      # month
                      month_names = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
                                     'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec')
                      if s[0] in month_names:
                          m = month_names.index(s[0]) + 1
                          # date
                          if s[1].isdigit():
                              d = int(s[1])
                              if 1 <= d <= 31:
                                  # year
                                  if s[2].isdigit():
                                      y = int(s[2])
                                      if y >= 1:
                                          # Return an integer as "yyyymmdd".
                                          return y * 10000 + m * 100 + d
              raise ValueError('failed to parse "{0}"'.format(self._head))
          raise ValueError('no first line')