From b156f5b02b355cbc6d42f52039f0e51cc876849c Mon Sep 17 00:00:00 2001 From: Jonathan Hvid Date: Wed, 10 Jun 2026 12:40:55 +0200 Subject: [PATCH] fix(pulse): show pulse close date instead of weekday The pulse close label rendered only the weekday (e.g. "Closes TUESDAY"), which is ambiguous for pulses closing more than a week out. Show the day and month instead (e.g. "Closes 23 JUNE") on both the /pulse page and the dispatch detail poll footer. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/pages/dispatches/[slug].astro | 2 +- src/pages/pulse.astro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/dispatches/[slug].astro b/src/pages/dispatches/[slug].astro index 56728a0..02055d8 100644 --- a/src/pages/dispatches/[slug].astro +++ b/src/pages/dispatches/[slug].astro @@ -46,7 +46,7 @@ const { prev, next } = getAdjacentDispatches(d.id); function closeDayLabel(closesAt: string): string { const parsed = closesAt.includes('T') ? new Date(closesAt) : new Date(closesAt.replace(' ', 'T') + 'Z'); - return new Intl.DateTimeFormat('en-GB', { weekday: 'long', timeZone: 'Europe/Copenhagen' }).format(parsed); + return new Intl.DateTimeFormat('en-GB', { day: 'numeric', month: 'long', timeZone: 'Europe/Copenhagen' }).format(parsed); } function parseUtc(s: string): Date { diff --git a/src/pages/pulse.astro b/src/pages/pulse.astro index a2b9049..40bb7a3 100644 --- a/src/pages/pulse.astro +++ b/src/pages/pulse.astro @@ -96,7 +96,7 @@ const featuredPreview = featured ? dispatchLongPreview(featured, 720) : ''; function closeDayLabel(closesAt: string): string { return new Intl.DateTimeFormat('en-GB', { - weekday: 'long', timeZone: 'Europe/Copenhagen', + day: 'numeric', month: 'long', timeZone: 'Europe/Copenhagen', }).format(parseUtc(closesAt)); }