see: http://stackoverflow.com/questions/2587345/javascript-date-parse