Display correct month on outstanding page
This commit is contained in:
parent
03784910b4
commit
5650f2561d
@ -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--;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user