From 1c5af8d70b104baa683f246c2341e1f68fe2eae0 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 23 九月 2024 14:03:24 +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