'use strict';

const isDateValid = date => {
  if (date === null) {
    return false;
  }
  if (date instanceof Date) {
    return validDateObject(date);
  }
  return validDateString(date);
};
const validDateString = dateString => validDateObject(new Date(dateString));
const validDateObject = dateObject => !isNaN(dateObject.getTime());

exports.isDateValid = isDateValid;
exports.validDateString = validDateString;
//# sourceMappingURL=isDateValid.js.map
