the JS date library is terrible. Look into moment if you need better date parsing.