From 6f13ff325ba143a21d5ac1877eaab4e7d4446719 Mon Sep 17 00:00:00 2001 From: Script Generator Date: Fri, 26 Jun 2026 15:50:30 +0800 Subject: [PATCH] =?UTF-8?q?docs(format):=20=E4=BF=AE=E6=AD=A3=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E6=97=A5=E6=9C=9F=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/lib/format.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/web/lib/format.ts b/apps/web/lib/format.ts index 9aa7fe0..c78dc9c 100644 --- a/apps/web/lib/format.ts +++ b/apps/web/lib/format.ts @@ -32,7 +32,7 @@ export function formatDate(iso?: string | null): string { } /** - * 格式化为 MM-DD HH:mm(紧凑版,本地时区) + * 格式化为 YYYY-MM-DD(本地日期,用于 date input / 今日筛选) */ export function formatLocalDate(date: Date = new Date()): string { const yyyy = date.getFullYear(); @@ -41,6 +41,9 @@ export function formatLocalDate(date: Date = new Date()): string { return `${yyyy}-${mm}-${dd}`; } +/** + * 格式化为 MM-DD HH:mm(紧凑版,本地时区) + */ export function formatDateTimeShort(iso?: string | null): string { if (!iso) return '-'; const d = new Date(iso);