diff --git a/src/components/Clock.tsx b/src/components/Clock.tsx index 70227f4..49309cd 100644 --- a/src/components/Clock.tsx +++ b/src/components/Clock.tsx @@ -34,9 +34,24 @@ const Clock: React.FC = ({ showSeconds = true, use24HourFormat = tru const minutesStr = rawMinutes.toString().padStart(2, '0'); const secondsStr = rawSeconds.toString().padStart(2, '0'); + const weekday = time.toLocaleDateString('en-US', { weekday: 'short' }).toUpperCase(); + const month = (time.getMonth() + 1).toString().padStart(2, '0'); + const day = time.getDate().toString().padStart(2, '0'); + const datePart = `${month}/${day}`; + return (
+ {/* Short Date (Left side, stacked) */} +
+ + {weekday} + + + {datePart} + +
+ {/* Hours */} {hoursStr} @@ -67,9 +82,9 @@ const Clock: React.FC = ({ showSeconds = true, use24HourFormat = tru )}
- {/* Date Display */} + {/* Motto */}
- {time.toLocaleDateString(language === 'zh' ? 'zh-CN' : 'en-US', { weekday: 'long', month: 'long', day: 'numeric' })} + 同是天涯沦落人,相逢何必曾相识
);