Display correct month on outstanding page

This commit is contained in:
Regalijan 2024-12-01 01:05:43 -05:00
parent 03784910b4
commit 5650f2561d
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -29,10 +29,10 @@ import { useEffect, useState } from "react";
export async function loader({ context }: { context: RequestContext }) { export async function loader({ context }: { context: RequestContext }) {
const now = new Date(); const now = new Date();
let month = now.getUTCMonth() + 1; let month = now.getUTCMonth();
let year = now.getUTCFullYear(); let year = now.getUTCFullYear();
if (month - 1 === 0) { if (month === 0) {
month = 12; month = 12;
year--; year--;
} }