misc.arsched: month is 0 indexed

This commit is contained in:
Cynthia Foxwell 2022-04-04 22:32:19 -06:00
parent bbbc82c611
commit 772d3188f2

View file

@ -284,7 +284,7 @@ arsched.callback = async function (msg, line) {
const delta = (targetDay + 7 - currentDay) % 7; const delta = (targetDay + 7 - currentDay) % 7;
let currentYear = now.getUTCFullYear(); let currentYear = now.getUTCFullYear();
const currentMonth = now.getUTCMonth(); const currentMonth = now.getUTCMonth() + 1;
const currentDateDay = now.getUTCDate(); const currentDateDay = now.getUTCDate();
let targetMonth = currentMonth; let targetMonth = currentMonth;
const lastDay = new Date(currentYear, currentMonth, 0).getDate(); const lastDay = new Date(currentYear, currentMonth, 0).getDate();