add correct date format
This commit is contained in:
+7
-3
@@ -43,14 +43,18 @@ function getNextUpdateDate() {
|
||||
}
|
||||
}
|
||||
|
||||
const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
return `${monthNames[updateMonth]} ${updateYear}`;
|
||||
const updateDate = new Date(updateYear, updateMonth, 28);
|
||||
const yyyy = updateDate.getFullYear();
|
||||
const mm = String(updateDate.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(updateDate.getDate()).padStart(2, '0');
|
||||
|
||||
return `${yyyy}-${mm}-${dd}`;
|
||||
}
|
||||
|
||||
function updateNavbarUpdateDate() {
|
||||
const container = document.getElementById('update-date-display');
|
||||
if (container) {
|
||||
container.textContent = `Next update: ${getNextUpdateDate()} 28`;
|
||||
container.textContent = `Next update: ${getNextUpdateDate()}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user