From 6b89deefc908a2cf6c9b7a9c4748f2f55fc068da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Tue, 27 Oct 2020 17:31:08 +0800 Subject: [PATCH] update --- lib/date.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/date.js b/lib/date.js index 13bcc15..d290698 100644 --- a/lib/date.js +++ b/lib/date.js @@ -43,7 +43,6 @@ if (!Date.prototype.getFullWeek) { if (!Date.prototype.format) { Object.defineProperty(Date.prototype, 'format', { value: function(str) { - str = str || 'Y-m-d H:i:s' var dt = { fullyear: this.getFullYear(), year: this.getYear(), @@ -58,6 +57,7 @@ if (!Date.prototype.format) { } var reg = null + str = str || 'Y-m-d H:i:s' dt.g = dt.hours > 12 ? dt.hours - 12 : dt.hours reg = {