Skip to content

Commit

Permalink
Scraper: Fixes incorrect default date range
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Aug 22, 2024
1 parent 30f39fa commit d49e5f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scraper/src/github-scraper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ const main = async () => {
if (dateArg) {
date = new Date(dateArg).toISOString();
} else {
date = formatISO(subDays(new Date(), 1), { representation: "date" });
date = formatISO(new Date(), { representation: "date" });
}
} catch (error) {
console.error("Invalid date value:", dateArg);
process.exit(1);
}
const endDate: Date = startOfDay(parseISO(date));
const startDate: Date = startOfDay(subDays(endDate, Number(numDays)));
const endDate = parseISO(date);
const startDate = subDays(endDate, Number(numDays));

await scrapeGitHub(orgName, endDate, startDate);
await mergedData(dataDir, processedData);
Expand Down

0 comments on commit d49e5f7

Please sign in to comment.