Fix date nonsense
This commit is contained in:
@ -74,6 +74,9 @@ export async function onRequestPatch(context: RequestContext) {
|
||||
const date = new Date();
|
||||
const currentDay = date.getUTCDate();
|
||||
|
||||
// Set to first of month to avoid any issues with month incrementation, then add month and subtract one day to get the last day of this month
|
||||
date.setUTCDate(1);
|
||||
date.setUTCMonth(date.getUTCMonth() + 1);
|
||||
date.setUTCDate(0);
|
||||
|
||||
if (
|
||||
|
Reference in New Issue
Block a user