修复gmdate方法已移除的bug
parent
b53aa1c4f5
commit
7cb6c5e7b8
|
@ -62,7 +62,10 @@ class Tool {
|
|||
date: function(str, format = '') {
|
||||
//去除参数里多余的引号
|
||||
format = format.replace(/^['"]/, '').replace(/['"]$/, '')
|
||||
return gmdate(format, str)
|
||||
if (isFinite(str)) {
|
||||
str = +str
|
||||
}
|
||||
return new Date(str).format(format)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue