Fix monthly events query
This commit is contained in:
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user