Pad date value with 0 - Node.js Date

Node.js examples for Date:Time Format

Description

Pad date value with 0

Demo Code

Date.prototype.getDisplayDate = function()
{
  return this.getDate() > 9 ? "" : "0" + this.getDate();
};

Related Tutorials