Nodejs Date Value Check isToDay()

Here you can find the source of isToDay()

Method Source Code

Date.prototype.isToDay =function(){
    var today = new Date();
    return today.toDateString() == this.toDateString();
};

Related

  1. isToday()
    Date.prototype.isToday = function(){
      const today = new Date();
      return this.getYear() === today.getYear() &&
        this.getMonth() === today.getMonth() &&
        this.getDate() === today.getDate();
    };
    
  2. isToday()
    Date.prototype.isToday = function() {
      return this.toLocaleDateString() === new Date().toLocaleDateString();
    
  3. isToday()
    Date.prototype.isToday = function() {
        var today = new Date();
        return today.getYear() == this.getYear()
                && today.getMonth() == this.getMonth()
                && today.getDate() == this.getDate();
    };
    
  4. isToday()
    Date.prototype.isToday = function() {
        var today = new Date();
        return (today.getFullYear() == this.getFullYear() && today.getMonth() == this.getMonth() && today.getDate() == this.getDate());
    };