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