From 6079f8228cfd7d8dd635092c9a9c3b44daca616c Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 28 Sep 2024 06:43:27 +0100 Subject: [PATCH] I THINK I FIXED IT --- src/common/model/player/impl/scoresaber-player.ts | 2 +- src/common/schema/player-schema.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/model/player/impl/scoresaber-player.ts b/src/common/model/player/impl/scoresaber-player.ts index 3e700d0..7b8eb18 100644 --- a/src/common/model/player/impl/scoresaber-player.ts +++ b/src/common/model/player/impl/scoresaber-player.ts @@ -108,7 +108,7 @@ export async function getScoreSaberPlayerFromToken( const date = getMidnightAlignedDate(getDaysAgoDate(daysAgo)); daysAgo += 1; // Increment daysAgo for each earlier rank - statisticHistory[date.toString()] = { + statisticHistory[formatDateMinimal(date)] = { rank: rank, }; } diff --git a/src/common/schema/player-schema.ts b/src/common/schema/player-schema.ts index 3ec91b2..787ae63 100644 --- a/src/common/schema/player-schema.ts +++ b/src/common/schema/player-schema.ts @@ -115,7 +115,7 @@ PlayerSchema.methods.sortStatisticHistory = function (): Map< Date.parse(b[0]) - Date.parse(a[0]), ) // Convert the date strings back to Date objects for the resulting Map - .map(([date, history]) => [new Date(date).toUTCString(), history]), + .map(([date, history]) => [formatDateMinimal(new Date(date)), history]), ); return this.statisticHistory; };