Added a header that displays the month

This commit is contained in:
ION606
2022-08-12 10:41:21 -07:00
parent 6a445679f7
commit 489047b084
2 changed files with 6 additions and 10 deletions
+2 -4
View File
@@ -457,16 +457,14 @@
const res = JSON.parse(xhr2.response);
const times = res[0];
const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
document.getElementById('monthName').innerText = `Editing Reminders for the Month of ${monthNames[(new Date()).getMonth()]}`;
times.forEach((time, ind) => {
const fullDate = new Date(Number(time));
const month = fullDate.getMonth();
const day = fullDate.getDate();
const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
document.getElementById('monthName').innerText = `Editing Reminders for the Month of ${monthNames[month]}`;
//Make sure it's the right month (old ones should be removed, this is just a catch)
if (month == (new Date()).getMonth()) {
if (calList.has(day)) {