From ae89ef41f849f39fd7ad33dad2ab67950363361e Mon Sep 17 00:00:00 2001 From: Alex Mickelson Date: Fri, 4 Oct 2024 10:30:48 -0600 Subject: [PATCH] hiding week changes --- README.md | 2 -- nextjs/src/app/course/[courseName]/calendar/CalendarMonth.tsx | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 699f117..8017ad1 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,6 @@ file uploads allow multiple courses to be edited concurrently in different browser tabs -have lock date mimic an offset after drag and drop changes due date - schedule planning view? just outline concepts? (maybe some non-canvas scheduled thing that only shows up in planner? like a note, could be de-emphasized in webpage) - probably have a notes section for each module. Have a toggle to expand notes in module diff --git a/nextjs/src/app/course/[courseName]/calendar/CalendarMonth.tsx b/nextjs/src/app/course/[courseName]/calendar/CalendarMonth.tsx index ba29591..2ce9001 100644 --- a/nextjs/src/app/course/[courseName]/calendar/CalendarMonth.tsx +++ b/nextjs/src/app/course/[courseName]/calendar/CalendarMonth.tsx @@ -8,9 +8,10 @@ import { getDateFromStringOrThrow } from "@/models/local/timeUtils"; export const CalendarMonth = ({ month }: { month: CalendarMonthModel }) => { const weekInMilliseconds = 604_800_000; + const four_days_in_milliseconds = 345_600_000 const isInPast = new Date(month.year, month.month, 1) < - new Date(Date.now() - weekInMilliseconds); + new Date(Date.now() - four_days_in_milliseconds); const monthName = new Date(month.year, month.month - 1, 1).toLocaleString( "default",