Compare two date value to see if they the same date - Node.js Date

Node.js examples for Date:Compare

Description

Compare two date value to see if they the same date

Demo Code

Date.prototype.isSameDate = function(dt){
    return this.getFullYear() == dt.getFullYear() && this.getMonth() == dt.getMonth() && this.getDate() == dt.getDate();
}

Related Tutorials