Get Two Digit Twelve Hour from Date - Node.js Date

Node.js examples for Date:Hour

Description

Get Two Digit Twelve Hour from Date

Demo Code


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

Related Tutorials