const isValidDate = function(date) { return (new Date(date) !== "Invalid Date") && !isNaN(new Date(date)); }
const isValid = !Number.isNaN(new Date(timestamp).getTime())
const validDate = !isNaN(Date.parse('foo'))