Javascript Date getFormatedTime()

Description

Javascript Date getFormatedTime()

Date.prototype.getFormatedTime = function() {
    var timeFormatOptions = { hour: "2-digit", minute: "2-digit" };
    return this.toLocaleTimeString("en-us", timeFormatOptions);
};



PreviousNext

Related