From 03b1a44fd561c5ccbf4ba53cc7856ec5c8c8e296 Mon Sep 17 00:00:00 2001 From: Emil Fattakhov <66026548+EmilFattakhov@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:38:36 -0500 Subject: [PATCH] Revert "Temp build December 2024 leaderboard" --- .github/scripts/leaderboard.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/scripts/leaderboard.js b/.github/scripts/leaderboard.js index b1df906e0e4..96a746de4e7 100644 --- a/.github/scripts/leaderboard.js +++ b/.github/scripts/leaderboard.js @@ -59,9 +59,14 @@ function generateKey(name) { return crypto.createHash('sha256').update(normalized).digest('hex'); } -// Change start and end dates -const startDate = "2024-12-01T00:00:00+00:00"; -const endDate = "2024-12-31T23:59:59+00:00"; +function formatDateToBeginningOfMonth(date) { + const year = date.getFullYear(); + const month = date.getMonth() + 1; // getMonth() is zero-indexed + + return `${year}-${month.toString().padStart(2, '0')}-01T00:00:00+00:00`; +} + +const formattedDate = formatDateToBeginningOfMonth(date); async function getProjectMembers() { try {