function getDateYear(date) {
  var newDate = parseDate(date);
  return newDate ? newDate.getFullYear() : null;
}
Get the year of the provided date.

@param {Date|String} date Date to get the year from.
@returns {Number|null} The year from the provided date.