From f2b546b60c28d94d287dd36747a82512e963b1bb Mon Sep 17 00:00:00 2001 From: Regalijan Date: Thu, 22 Feb 2024 13:46:23 -0500 Subject: [PATCH] Fix monthly events query --- functions/api/events-team/events/new.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/api/events-team/events/new.ts b/functions/api/events-team/events/new.ts index eeb9325..fa0a83f 100644 --- a/functions/api/events-team/events/new.ts +++ b/functions/api/events-team/events/new.ts @@ -3,7 +3,7 @@ import { jsonError } from "../../../common.js"; export async function onRequestPost(context: RequestContext) { const { day, details, type } = context.data.body; const now = new Date(); - const currentMonth = now.getUTCMonth(); + const currentMonth = now.getUTCMonth() + 1; const currentYear = now.getUTCFullYear(); const lastDayOfMonth = new Date(currentYear, currentMonth, 0).getUTCDate();