Javascript Date shortFormat()

Description

Javascript Date shortFormat()


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

Javascript Date shortFormat()

// Custom Date function to display a date in MM/DD/YYYY format
Date.prototype.shortFormat = function () {
    return (this.getMonth() + 1) + "/" + this.getDate() + "/" + this.getFullYear();
}

Javascript Date shortFormat()

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

Javascript Date shortFormat()

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



PreviousNext

Related