Add dates to events again

This commit is contained in:
Lukas Wölfer
2025-05-07 12:45:42 +02:00
parent be22295786
commit 76bc73ba97

View File

@@ -28,7 +28,7 @@ export function writeSections(events: VideoDescription[][]): string {
const event_name = token.event === token.location ? token.event : token.event + " " + token.location const event_name = token.event === token.location ? token.event : token.event + " " + token.location
// FIXME: This will break with videos in 75 years // FIXME: This will break with videos in 75 years
const event_contains_year = event_name.match(/\d{2}|20\d{2}/) === null const event_contains_year = event_name.match(/\d{2}|20\d{2}/) !== null
const event_date = event_contains_year ? "" : new Date(token.date).getFullYear().toString() const event_date = event_contains_year ? "" : new Date(token.date).getFullYear().toString()
let r = `== ${event_name} ${event_date} ==\n` let r = `== ${event_name} ${event_date} ==\n`