Compare two date to see which one is older - Node.js Date

Node.js examples for Date:Compare

Description

Compare two date to see which one is older

Demo Code


Date.prototype.olderThan = function(minutes) {
  var now = new Date();
  return now.getTime() - this.getTime() > minutes*60*1000
};

Related Tutorials