const checkDate = (dateString) => {
  if (isNaN(Date.parse(dateString))) {
    return false;
  }
  return true;
}
module.exports = checkDate;

const checkDate = (dateString) => {
  if (isNaN(Date.parse(dateString)) == false) {
    return true;
  } else if (isNaN((new Date(dateString)).getHours()) == false) {
    return true;
  }
  return false;
}
module.exports = checkDate;

Implement unix timestamp part of checkDate
Implement unix timestamp part of checkDate
