未验证 提交 384f9294 编写于 作者: H hunshcn 提交者: GitHub

fix(utils): fix dateUtil.formatToDate ts type (#2345)

上级 9ba15705
......@@ -13,10 +13,8 @@ export function formatToDateTime(
return dayjs(date).format(format);
}
export function formatToDate(
date: dayjs.Dayjs | undefined = undefined,
format = DATE_FORMAT,
): string {
export function formatToDate(date?: dayjs.ConfigType, format = DATE_FORMAT): string {
if (typeof date === 'number') date *= 1000;
return dayjs(date).format(format);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册