Custom Date function to display a date in MM/DD/YYYY format - Node.js Date

Node.js examples for Date:Date Format

Description

Custom Date function to display a date in MM/DD/YYYY format

Demo Code

Date.prototype.shortFormat = function() {
  return (this.getMonth() + 1) + "/" + this.getDate() + "/" + this.getFullYear();
}

Related Tutorials