Fix monthly events query
This commit is contained in:
parent
41d5935fb5
commit
f2b546b60c
@ -3,7 +3,7 @@ import { jsonError } from "../../../common.js";
|
|||||||
export async function onRequestPost(context: RequestContext) {
|
export async function onRequestPost(context: RequestContext) {
|
||||||
const { day, details, type } = context.data.body;
|
const { day, details, type } = context.data.body;
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const currentMonth = now.getUTCMonth();
|
const currentMonth = now.getUTCMonth() + 1;
|
||||||
const currentYear = now.getUTCFullYear();
|
const currentYear = now.getUTCFullYear();
|
||||||
const lastDayOfMonth = new Date(currentYear, currentMonth, 0).getUTCDate();
|
const lastDayOfMonth = new Date(currentYear, currentMonth, 0).getUTCDate();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user