From 9c07acba6d66bd6ef3a9bdf7e49f117f52b0be84 Mon Sep 17 00:00:00 2001 From: Tom Plant <21111317+pl4nty@users.noreply.github.com> Date: Thu, 9 Nov 2023 23:15:50 +1100 Subject: [PATCH] fix: 2024 in UI dropdown --- api/sessions/index.mjs | 3 ++- src/utils.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/sessions/index.mjs b/api/sessions/index.mjs index b825b524..7c816cc9 100644 --- a/api/sessions/index.mjs +++ b/api/sessions/index.mjs @@ -3,7 +3,8 @@ export default async function (context, req) { body: { 2021: ['S1','S2','X1','X2','X3','X4'], 2022: ['S1','S2','X1','X2','X3','X4'], - 2023: ['S1','S2','X1','X2','X3','X4'] + 2023: ['S1','S2','X1','X2','X3','X4'], + 2024: ['S1','S2','X1','X2','X3','X4'] } } } \ No newline at end of file diff --git a/src/utils.js b/src/utils.js index 3ad9feb8..c6dd3e9e 100644 --- a/src/utils.js +++ b/src/utils.js @@ -92,8 +92,9 @@ export const unsetQueryParam = param => { export const getStartOfSession = () => { const [year, session] = getInitialState() return { - '2022S1': new Date('2022-02-20T21:00:00Z'), // 8AM 21 Feb in GMT - '2023S1': new Date('2023-02-20T21:00:00Z'), // 8AM 21 Feb in GMT + '2022S1': new Date('2022-02-20T21:00:00Z'), // 8AM Mon 21 Feb in GMT + '2023S1': new Date('2023-02-19T21:00:00Z'), // 8AM Mon 20 Feb in GMT + '2024S1': new Date('2024-02-18T21:00:00Z'), // 8AM Mon 19 Feb in GMT }?.[year + session] }