Get Two Digit Second from Date - Node.js Date

Node.js examples for Date:Second

Description

Get Two Digit Second from Date

Demo Code


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

Related Tutorials