fix:tool中修改格式化日期方法
This commit is contained in:
parent
b92937fb9b
commit
4e1a6901fd
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in New Issue