function getDate (param) { var date = new Date(param) if (date.toString() === 'Invalid Date') return false return date }
gist