How about this?
Date.prototype.withoutTime = function () { var d = new Date(this); d.setHours(0, 0, 0, 0, 0); return dd; } It allows you to compare the date part of the date like this without affecting the value of your variable:
var date1 = new Date(2014,1,1); new Date().withoutTime() > date1.withoutTime(); // true