<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/*鏃堕棿鎿嶄綔绫�*/
/*鏃堕棿鎿嶄綔绫�*/
Date.prototype.format = function (formater) {
    var o = {
        M: this.getMonth() + 1, d: this.getDate(), H: this.getHours(), m: this.getMinutes(),
        s: this.getSeconds(), q: Math.floor((this.getMonth() + 3) / 3), S: this.getMilliseconds()
    };
    if (/(y+)/.test(formater))
        formater = formater.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for (var k in o) {
        if (new RegExp("(" + k + "+)").test(formater)) {
            formater = formater.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
        }
    }
    return formater;
};
Date.prototype.addHours = function(h) { this.setHours(this.getHours() + h) };
Date.prototype.addMinutes = function(mi) { this.setMinutes(this.getMinutes() + mi) };
Date.prototype.addDays = function(d) { this.setDate(this.getDate() + d) };
Date.prototype.addWeeks = function(w) { this.addDays(w * 7) };
Date.prototype.addMonths = function(m) {
    var d = this.getDate();
    this.setMonth(this.getMonth() + m);
    if (this.getDate() &lt; d) { this.setDate(0) }
};
Date.prototype.addYears = function(y) {
    var m = this.getMonth();
    this.setFullYear(this.getFullYear() + y);
    if (m &lt; this.getMonth()) { this.setDate(0) }
};
String.prototype.toDate = function() { style = "yyyy-MM-dd hh:mm:ss"; var compare = { "y+": "y", "M+": "M", "d+": "d", "h+": "h", "m+": "m", "s+": "s" }; var result = { "y": "", "M": "", "d": "", "h": "00", "m": "00", "s": "00" }; var tmp = style; for (var k in compare) { if (new RegExp("(" + k + ")").test(style)) { result[compare[k]] = this.substring(tmp.indexOf(RegExp.$1), tmp.indexOf(RegExp.$1) + RegExp.$1.length) } } return new Date(result.y, result.M - 1, result.d, result.h, result.m, result.s) };</pre></body></html>