I think it's possible that ```date``` is not a Date if it's passed an invalid date string via the URL: http://stackoverflow.com/questions/1353684/detecting-an-invalid-date-date-instance-in-javascript