Fix date nonsense
This commit is contained in:
parent
98c662ed9b
commit
44ab73c8a5
@ -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 (
|
||||
|
Loading…
x
Reference in New Issue
Block a user