From e813f39ab2558c7132723afa27ab303763b36cf3 Mon Sep 17 00:00:00 2001 From: TheShadowEevee Date: Mon, 23 Dec 2024 18:41:44 -0600 Subject: [PATCH] In-Progress streak count --- commands/commit-count.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/commands/commit-count.js b/commands/commit-count.js index fc19999..6e7f536 100644 --- a/commands/commit-count.js +++ b/commands/commit-count.js @@ -146,6 +146,7 @@ module.exports = { }; const allDays = []; + const dayMap = new Map(); let currentDate = startDate; while (currentDate <= endDate) { @@ -165,11 +166,19 @@ module.exports = { const formattedDay = monthName + ' ' + day.getDate().toString(); - if (!validDays.includes(formattedDay)) { + if (validDays.includes(formattedDay)) { + dayMap.set(formattedDay, true); + } + else { invalidString += `${formattedDay}\n`; + dayMap.set(formattedDay, false); } } + //for (const [day, hasCommit] of dayMap) { + + //} + if (invalidString != '') { resultsEmbed.fields.push( {