pass in new Date correctly

and fix some jshint