|
|
|
@ -9,7 +9,8 @@ import {
|
|
|
|
|
leftPad, |
|
|
|
|
parseDateTime, |
|
|
|
|
values, |
|
|
|
|
isArray |
|
|
|
|
isArray, |
|
|
|
|
getDate |
|
|
|
|
} from "../2.base"; |
|
|
|
|
import { replaceAll } from "./string"; |
|
|
|
|
import { getFullDayName, getMonthName, getTimezone } from "./date"; |
|
|
|
@ -680,10 +681,10 @@ export const contentFormat = function(cv, fmt) {
|
|
|
|
|
if (!(cv instanceof Date)) { |
|
|
|
|
if (typeof cv === "number") { |
|
|
|
|
// 毫秒数类型
|
|
|
|
|
cv = new Date(cv); |
|
|
|
|
cv = getDate(cv); |
|
|
|
|
} else { |
|
|
|
|
// 字符串类型转化为date类型
|
|
|
|
|
cv = new Date(Date.parse((`${cv}`).replace(/-|\./g, "/"))); |
|
|
|
|
cv = getDate(Date.parse((`${cv}`).replace(/-|\./g, "/"))); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!isInvalidDate(cv) && !isNull(cv)) { |
|
|
|
|