Javascript Date today(date)
Date.prototype.today = function (date) { if (this != undefined && this.constructor == Date) { if (date == undefined) { date = new Date()//w ww . ja v a 2s. com } if (this.getYear() == date.getYear() && this.getMonth() == date.getMonth() && this.getDate() == date.getDate()) { return true } else { return false } } }