The strangness is those setters that return Number object
var date = new Date().setHours(0,0,0,0);
var date = new Date(); date.setHours( 0,0,0,0 );
setHours() actually has two effects:
So in your case, just create the object and set the time separately afterwards. You can then ignore the return value entirely, if you don't need it.