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( {