fix breaking bug

This commit is contained in:
MathMan05 2024-09-08 14:40:16 -05:00
parent e9c852ac33
commit 1de824be6b
2 changed files with 3 additions and 2 deletions

View file

@ -641,7 +641,7 @@ class Message extends SnowFlake{
}
let now:string;
let yesterdayStr:string;
updateTimes();
function formatTime(date:Date){
updateTimes();
const datestring=date.toLocaleDateString();
@ -657,6 +657,7 @@ function formatTime(date:Date){
}
const d = new Date();
let tomorrow=d.setHours(24,0,0,0);
updateTimes();
function updateTimes(){
if(tomorrow<Date.now()){
tomorrow=d.setHours(24,0,0,0);