Add dates to events again
This commit is contained in:
2
write.ts
2
write.ts
@@ -28,7 +28,7 @@ export function writeSections(events: VideoDescription[][]): string {
|
||||
const event_name = token.event === token.location ? token.event : token.event + " " + token.location
|
||||
|
||||
// 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()
|
||||
|
||||
let r = `== ${event_name} ${event_date} ==\n`
|
||||
|
||||
Reference in New Issue
Block a user