Get Two Digit Hour - Node.js Date

Node.js examples for Date:Hour

Description

Get Two Digit Hour

Demo Code

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

Related Tutorials