feat: add Fresh Season 2023
parent
80c4c8a422
commit
821dc08c5f
|
|
@ -22,6 +22,10 @@ Deno.test("getSeason", () => {
|
||||||
|
|
||||||
assertEquals(season2?.id, "season202212");
|
assertEquals(season2?.id, "season202212");
|
||||||
|
|
||||||
|
const season3 = getSeason(new Date("2023-03-01T00:00:00+00:00"));
|
||||||
|
|
||||||
|
assertEquals(season3?.id, "season202303");
|
||||||
|
|
||||||
const nonExist = getSeason(new Date("2022-06-09T00:00:00+00:00"));
|
const nonExist = getSeason(new Date("2022-06-09T00:00:00+00:00"));
|
||||||
|
|
||||||
assertEquals(nonExist, undefined);
|
assertEquals(nonExist, undefined);
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,12 @@ export const SEASONS: Season[] = [
|
||||||
start: new Date("2022-12-01T00:00:00+00:00"),
|
start: new Date("2022-12-01T00:00:00+00:00"),
|
||||||
end: new Date("2023-03-01T00:00:00+00:00"),
|
end: new Date("2023-03-01T00:00:00+00:00"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "season202303",
|
||||||
|
name: "Fresh Season 2023",
|
||||||
|
start: new Date("2023-03-01T00:00:00+00:00"),
|
||||||
|
end: new Date("2023-06-01T00:00:00+00:00"),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const getSeason = (date: Date): Season | undefined => {
|
export const getSeason = (date: Date): Season | undefined => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue