refactor: 계절 이름·아이콘(seasonOf)을 lib 로 옮김
This commit is contained in:
1 parent
9a82cfbedc
commit
43e1925d70
1 file changed
+4
@@ -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']
|
||||
|
||||
|
||||
Reference in new issue
Block a user