From 9907560470c1a6821f4998453bb885cd9fee3445 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期日, 29 九月 2024 08:56:49 +0800 Subject: [PATCH] 预测数据分析 --- src/utils/dateUtil.ts | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/utils/dateUtil.ts b/src/utils/dateUtil.ts index 316b870..b83c3a5 100644 --- a/src/utils/dateUtil.ts +++ b/src/utils/dateUtil.ts @@ -6,6 +6,7 @@ const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss' const DATE_FORMAT = 'YYYY-MM-DD' +const DATE_TIME_PATTERN_STRING = 'YYYYMMDDHHmmss' export function formatToDateTime(date?: dayjs.ConfigType, format = DATE_TIME_FORMAT): string { return dayjs(date).format(format) @@ -15,4 +16,8 @@ return dayjs(date).format(format) } +export function formatToDateString(date?: dayjs.ConfigType, format = DATE_TIME_PATTERN_STRING): string { + return dayjs(date).format(format) +} + export const dateUtil = dayjs -- Gitblit v1.9.3