Skip to content

Parse multi-day Tito events - #763

Merged
alistairjcbrown merged 1 commit into
mainfrom
ccr-41f8bd15-n1f8wu
Oct 8, 2026
Merged

alistairjcbrown merged 1 commit into
mainfrom
ccr-41f8bd15-n1f8wu

Conversation

@alistairjcbrown

Copy link
Copy Markdown
Member

Problem

Transform failed (run):

Error: Failed to parse Tito time: "4pm, October 21stpm"
    at parseTitoTime (sources/ti.to/find-events.js:46:9)

Queer East currently lists two events that span two days, queereast/in-the-mist and queereast/traversing-the-mist. Tito renders their calendar text as:

4pm, October 21st–8pm, October 22nd, 2026

parseCalText assumed a same-day range (2–4:15pm, February 21st, 2026), so it treated 4pm, October 21st as a bare time, added pm and threw. Because every transform job reads the ti.to source, this broke transforms for unrelated venues.

Fix

When the start side carries its own date (contains a comma), parse it as a time plus date, taking the year from the end date. If that puts the start after the end (an event running over New Year), step back one year. Same-day ranges are parsed as before.

Checked by hand under TZ=Europe/London:

Input Start End
4pm, October 21st–8pm, October 22nd, 2026 21 Oct 2026 16:00 BST 22 Oct 2026 20:00 BST
2–4:15pm, February 21st, 2026 21 Feb 2026 14:00 21 Feb 2026 16:15
11pm, December 31st–2am, January 1st, 2027 31 Dec 2026 23:00 1 Jan 2027 02:00

npm test -- sources/ti.to, ESLint and Prettier pass.

Notes

  • These events come through as one performance at the start time, with a 28-hour duration. They look like installations rather than screenings, so they may want different handling, but they no longer crash the transform.
  • No new test case: the existing ti.to recordings only include single-day events. Re-recording against the current Queer East page would cover this format.

🤖 Generated with Claude Code

https://claude.ai/code/session_014oHUvXMcpjGqjMk9dKyfxV


Generated by Claude Code

Queer East's In the Mist events run 4pm, October 21st to 8pm, October
22nd, which Tito renders with a date on both ends. The parser assumed a
same-day range and failed on the start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014oHUvXMcpjGqjMk9dKyfxV
@alistairjcbrown
alistairjcbrown merged commit ca8b6da into main Oct 8, 2026
2 checks passed
@alistairjcbrown
alistairjcbrown deleted the ccr-41f8bd15-n1f8wu branch October 8, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants