From 0b6e92a75fbff02f482b183ca9d85036deb4edf1 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Fri, 19 Feb 2021 22:12:10 +0100 Subject: [PATCH] fix issue with month returning 1 less than expected --- util/creationJoinDates.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/creationJoinDates.js b/util/creationJoinDates.js index 5c35ce2..d27badd 100644 --- a/util/creationJoinDates.js +++ b/util/creationJoinDates.js @@ -2,9 +2,9 @@ module.exports = function (user) { let creationMonth, creationDate, creationHours, creationMinutes, creationSeconds; if (user.createdAt.getUTCMonth().toString().length === 1) - creationMonth = "0" + user.createdAt.getUTCMonth() + creationMonth = "0" + (1+user.createdAt.getUTCMonth()) else - creationMonth = user.createdAt.getUTCMonth() + creationMonth = (1+user.createdAt.getUTCMonth()) if (user.createdAt.getUTCDate().toString().length === 1) creationDate = "0" + user.createdAt.getUTCDate()