Is Date today - Node.js Date

Node.js examples for Date:Day

Description

Is Date today

Demo Code


Date.prototype.isToday = function () {
  var date = new Date

  return date.getFullYear() == this.getFullYear() &&
         date.getMonth() == this.getMonth() &&
         date.getDate() == this.getDate()
}

Related Tutorials