function parseYear(publishDate) {
  const match = publishDate && publishDate.match(/\d{4}/)[0];

  return match ? parseInt(match, 10) : null;
}
Parse the Open Library publish date into a proper year number.

@param {string} publishDate The Open Library publish date.
@returns A parsed year as a number if it matches