fix(utils): fix dateUtil.formatToDate ts type (#2345)
This commit is contained in:
parent
9ba15705b5
commit
384f929443
|
|
@ -13,10 +13,8 @@ export function formatToDateTime(
|
||||||
return dayjs(date).format(format);
|
return dayjs(date).format(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function formatToDate(
|
export function formatToDate(date?: dayjs.ConfigType, format = DATE_FORMAT): string {
|
||||||
date: dayjs.Dayjs | undefined = undefined,
|
if (typeof date === 'number') date *= 1000;
|
||||||
format = DATE_FORMAT,
|
|
||||||
): string {
|
|
||||||
return dayjs(date).format(format);
|
return dayjs(date).format(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue