From 4e1a6901fdb67e82aeb3421f5adc0173304a7a45 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 22 Nov 2024 10:00:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:tool=E4=B8=AD=E4=BF=AE=E6=94=B9=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E6=97=A5=E6=9C=9F=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tool.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/tool.js b/src/utils/tool.js index 0e44a085..d92ef2fc 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -173,6 +173,7 @@ tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') { } return fmt; } +// YYYY-MM-DD hh:mm:ss tool.dateFormat1 = function (date) { date = new Date(date); let newDate = ''; @@ -190,7 +191,7 @@ tool.dateFormat1 = function (date) { newDate = year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second; return newDate; } -// 格式化某一天 +// YYYY-MM-DD 格式化某一天 tool.dateFormat2 = function (date) { date = new Date(date); let newDate = ''; @@ -203,7 +204,7 @@ tool.dateFormat2 = function (date) { return newDate; } // 格式化某一月 -tool.dateFormat2 = function (date) { +tool.monthFormat = function (date) { date = new Date(date); let first = ''; let lastDate = '',year2 = '',month2 = '';