Get Two Digit Date from Date - Node.js Date

Node.js examples for Date:Time Format

Description

Get Two Digit Date from Date

Demo Code


Date.prototype.getTwoDigitDate = function() {
    return (this.getDate() < 10) ? '0' + this.getDate() : this.getDate();
}

Related Tutorials