Fix Date Bugggggggggggggggggggggggggggggggggggggggg

This commit is contained in:
Michael 2025-01-11 01:42:52 -05:00
parent 5345ae4761
commit 693979cbd2

View file

@ -112,7 +112,23 @@ module.exports = {
} }
} }
messageMap = new Map([...messageMap.entries()].sort((a, b) => a - b)); messageMap = new Map([...messageMap.entries()].sort((a, b) => {
if (a[1] == b[1]) {
if (b > a) {
return -1;
}
else if (a < b) {
return 1;
}
return 0;
}
else if (a[1] < b[1]) {
return -1;
}
else {
return 1;
}
}));
// Start Commit Checking // Start Commit Checking
let validString = ''; let validString = '';
@ -204,7 +220,7 @@ module.exports = {
if (validDays.includes(formattedDay)) { if (validDays.includes(formattedDay)) {
dayMap.set(formattedDay, true); dayMap.set(formattedDay, true);
} }
else if (formattedDay != (monthName + ' ' + (new Date()).getDate().toString().padStart(2, 0))) { else if (formattedDay != (monthName + ' ' + (new Date()).getDate().toString())) {
invalidString += `${formattedDay}\n`; invalidString += `${formattedDay}\n`;
dayMap.set(formattedDay, false); dayMap.set(formattedDay, false);
} }