Back to top.
Check in nodejs whether a string param is date or not
function getDate (param) {
    var date = new Date(param)
    if (date.toString() === 'Invalid Date') return false
    return date
  }

gist

http://tmblr.co/Z4bAYxVTGVwy
  1. hermanjunge posted this