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 = '';