Include date and time of last scrape in event description

This commit is contained in:
Clarence Chan committed 2023-09-14 22:07:41 -04:00
1 parent 48b5285600
commit 0ea89eb1c4
2 files changed
+12 -1

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ name: GitHub Self-Updating Repository
on: on:
push: push:
schedule: schedule:
- cron: "37 */4 * * *" - cron: "0 */4 * * *"
jobs: jobs:
report: report:
+11
View File
@@ -6,6 +6,16 @@ async function createICS() {
try { try {
let events = await getAllDetailedEvents(); let events = await getAllDetailedEvents();
let currentDateTime = new Date();
let dateTimestr = currentDateTime.toLocaleString("en-US", {
month: "short",
day: "numeric",
hour: "numeric",
minute: "numeric",
timeZone: "America/Toronto",
timeZoneName: "short",
});
events = events.map((event) => { events = events.map((event) => {
let date = new Date(parseInt(event.date) * 1000); let date = new Date(parseInt(event.date) * 1000);
let start = [ let start = [
@@ -27,6 +37,7 @@ async function createICS() {
description += description +=
"\nPrelims\n----------\n" + event.prelims.join("\n") + "\n"; "\nPrelims\n----------\n" + event.prelims.join("\n") + "\n";
description += "\n" + event.url; description += "\n" + event.url;
description += "\n\nAccurate as of " + dateTimestr;
let location = event.location; let location = event.location;
let uid = event.url; let uid = event.url;
let calName = "UFC"; let calName = "UFC";