I'm trying to figure out if different browsers will return different messages/errors when a string is passed into a date function as per the below example where last = "new visit":
var lastVisit = new Date(last);
Chrome returns "Invalid Date
" but not sure how robust this will be across all browsers if I'm using:
if(lastvisit != "Invalid Date")
I'm not sure if there is a better way to detect if I got a date format back or an invalid date? I can't do anything about the string being passed. It will happen the initial session a user hits the site.