Event dates in UK order; latest same-day news story first #34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claw/event-dates-uk-6a1f"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #33.
What changed
displayEventDate()insrc/lib/event-order.tsshows them as "13 – 14 May 2026" on the events list, the event page and its "other events" tiles. A label it cannot read ("Date TBC", "Autumn 2026", "Mid-October 2026") is shown exactly as typed. Stored labels are not rewritten.Date.parse, so a range with the year only on its end ("October 11 - October 14, 2026") and a compact range ("May 13-14, 2026") sort by their start date.NEWS_SORT(datedesc, thencreatedAtdesc, thenorder) is used by the public loader, the admin page and the admin API, so stories dated the same day list the most recently added first.Walkthrough
Story: as a site visitor, I read event dates written the British way.
Driven in a browser (Playwright) against
npm run devon this branch, with the local database, whose stored labels are US-style:/eventsMay 13, 2026 – May 14, 202613 – 14 May 2026 | Exhibition/eventsJune 23, 202623 June 2026 | Conference/eventsAugust 2026August 2026 | Briefing/eventsSeptember 28, 2026 – October 1, 202628 September – 1 October 2026 | Conference/events/biba-conference-202613 – 14 May 2026; tiles23 June 2026,August 2026,28 September – 1 October 2026/admin/events13 – 14 May 2026on all four date fields/admin/news,/newsReference: UK date order (day month year, en dash for ranges) as used on gov.uk and by UK insurance market sites; no accounting or reference-system behaviour is involved.
QA Execution
2026-10-12, local:
npx tsc --noEmit— exit 0npm run build— exit 0October 11 - 14, 2026→11 – 14 October 2026;December 30, 2026 – January 2, 2027→30 December 2026 – 2 January 2027;May 13, 2026 – May 13, 2026→13 May 2026;Oct. 3, 2026→3 October 2026;Date TBC,Autumn 2026,2026, empty → unchanged and sorted last.startDateof 2026-05-13,August 2026,October 11 - October 14, 2026,Date TBCcome out in that order.Not done in this PR
June 31, 2026is shown as31 June 2026.tawasession had expired), so the table above is from the local database.🤖 Generated with Claude Code