From 43e1925d708b114aaea91f5682f72807959ac86d Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Mon, 12 Oct 2026 17:07:13 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EA=B3=84=EC=A0=88=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=C2=B7=EC=95=84=EC=9D=B4=EC=BD=98(seasonOf)=EC=9D=84?= =?UTF-8?q?=20lib=20=EB=A1=9C=20=EC=98=AE=EA=B9=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/b/lib.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/b/lib.ts b/frontend/src/b/lib.ts index 7f64e84..60daecc 100644 --- a/frontend/src/b/lib.ts +++ b/frontend/src/b/lib.ts @@ -43,6 +43,10 @@ export const fall = (d: string, f = '4.8s', amp?: string) => ({ '--d': d, '--f': export const WEEKDAYS = ['일', '월', '화', '수', '목', '금', '토'] as const +// 달(1~12) → 계절 이름과 아이콘. 봄 3–5 · 여름 6–8 · 가을 9–11 · 겨울 12–2 (서버 각 제철 기준과 같다) +const SEASONS: [string, string][] = [['겨울', 'snow'], ['봄', 'garden'], ['여름', 'sun'], ['가을', 'maple']] +export const seasonOf = (month: number) => SEASONS[Math.floor((month % 12) / 3)] + const KST = new Intl.DateTimeFormat('en-US', { timeZone: 'Asia/Seoul', year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', hourCycle: 'h23', weekday: 'short' }) const WD_EN = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']