diff --git a/scrape/parse/v1_v2.js b/scrape/parse/v1_v2.js index 63daec5..04cdfe3 100644 --- a/scrape/parse/v1_v2.js +++ b/scrape/parse/v1_v2.js @@ -40,7 +40,7 @@ export default async function parseV1V2(downloadedFilePath) { const day = parseInt(match[2], 10); const month = parseInt(match[3], 10) - 1; - const year = parseInt(match[4], 10); + const year = match[4].length === 2 ? Number('20' + match[4]) : Number(match[4]); const sheetDate = new Date(year, month, day); if (sheetDate < today) continue; diff --git a/scrape/parse/v3.js b/scrape/parse/v3.js index e7402ef..b283567 100644 --- a/scrape/parse/v3.js +++ b/scrape/parse/v3.js @@ -68,7 +68,7 @@ function getUpcomingSheets(workbook) { const day = Number(match[2]); const month = Number(match[3]) - 1; - const year = Number(match[4]); + const year = match[4].length === 2 ? Number('20' + match[4]) : Number(match[4]); const sheetDate = new Date(year, month, day); if (sheetDate < todayMidnight) continue;