feat(home): format upcoming special dates with TZ support

This commit is contained in:
Hördle Bot
2025-11-23 02:33:22 +01:00
parent b294a3a8e6
commit 8262a96213

View File

@@ -69,7 +69,12 @@ export default async function Home() {
<div style={{ marginTop: '0.5rem', fontSize: '0.875rem', color: '#666' }}>
Coming soon: {upcomingSpecials.map(s => (
<span key={s.id} style={{ marginLeft: '0.5rem' }}>
{s.name} ({s.launchDate?.toLocaleDateString()})
{s.name} ({s.launchDate ? new Date(s.launchDate).toLocaleDateString('de-DE', {
day: '2-digit',
month: '2-digit',
year: 'numeric',
timeZone: process.env.TZ
}) : ''})
{s.curator && <span style={{ fontStyle: 'italic', marginLeft: '0.25rem' }}>Curated by {s.curator}</span>}
</span>
))}