diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index b069a3f..6609c59 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -25,7 +25,18 @@ const homepageQuery = `{ }`; function formattingDate(date: Date) { - return date.toISOString().slice(0, 10).replaceAll('-', '/'); + const month = date.getMonth() + 1; + const year = date.getFullYear(); + + if (month >= 1 && month <= 4) { + return `Winter ${year}`; + } + + if (month >= 8 && month <= 12) { + return `Fall ${year}`; + } + + return 'Closed for the summer'; } export const load = async ({ url }) => { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 649d98b..dbcbac2 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -75,7 +75,7 @@ {#if data.ohLastUpdated}
- Last updated: {data.ohLastUpdated} + Semester: {data.ohLastUpdated} {/if}