diff --git a/sources/ti.to/find-events.js b/sources/ti.to/find-events.js index 03b0729b..f8593a83 100644 --- a/sources/ti.to/find-events.js +++ b/sources/ti.to/find-events.js @@ -166,7 +166,7 @@ function extractEventDetails(html, url) { venueName: locationText, venueAddress: locationText, coordinates: null, - parsedDate: parseCalText(calText), + calText, description, }; } @@ -176,20 +176,24 @@ function extractEventDetails(html, url) { // First segment of venue address is the venue name const venueName = venueAddress.split(",")[0].trim(); - const parsedDate = parseCalText(calText); - return { title, venueName, venueAddress, coordinates, - parsedDate, + calText, description, }; } function convertTitoEvent(url, eventDetails) { - const { title, parsedDate, description } = eventDetails; + const { title, calText, description } = eventDetails; + // Parsed only once the event is known to be at one of our venues. Tito + // lists every event an organiser runs, and one elsewhere in the country + // with a date and no time ("November 16th, 2026") has no performance to + // give - which should stop the run for a venue we carry, and not for one + // we don't. + const parsedDate = parseCalText(calText); const eventPath = extractEventPath(url); const duration = differenceInMinutes( parsedDate.endDate, diff --git a/sources/ti.to/tests/index.test.js b/sources/ti.to/tests/index.test.js index dcdca875..3e5e3b57 100644 --- a/sources/ti.to/tests/index.test.js +++ b/sources/ti.to/tests/index.test.js @@ -159,4 +159,59 @@ describe(`${attributes.name}`, () => { expect(output).toHaveLength(0); }); }); + + // Markup from https://ti.to/queereast/girlfriends_uok_2026, which gives a + // date and no time + describe("an event with a date and no time", () => { + const html = ` +