mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 15:18:32 -06:00
month buffer
This commit is contained in:
@@ -21,3 +21,11 @@ courses:
|
||||
name: 1405 old
|
||||
- path: ./1405/2026_spring_alex
|
||||
name: "1405"
|
||||
- path: ./1810/2026-spring-alex/modules
|
||||
name: Web Intro Spring
|
||||
- path: ./3840_Telemetry/2026_spring_alex
|
||||
name: Telem and Ops New
|
||||
- path: ./4620_Distributed/2025Spring/modules/
|
||||
name: distributed-old
|
||||
- path: ./4620_Distributed/2026-spring-alex/modules
|
||||
name: Distributed
|
||||
|
||||
@@ -13,10 +13,11 @@ export default function CourseCalendar() {
|
||||
() => getDateFromStringOrThrow(settings.startDate, "course start date"),
|
||||
[settings.startDate]
|
||||
);
|
||||
const endDateTime = useMemo(
|
||||
() => getDateFromStringOrThrow(settings.endDate, "course end date"),
|
||||
[settings.endDate]
|
||||
);
|
||||
const endDateTime = useMemo(() => {
|
||||
const date = getDateFromStringOrThrow(settings.endDate, "course end date");
|
||||
date.setDate(date.getDate() + 14); // buffer to make sure calendar shows week of finals and grades due
|
||||
return date;
|
||||
}, [settings.endDate]);
|
||||
const months = useMemo(
|
||||
() => getMonthsBetweenDates(startDateTime, endDateTime),
|
||||
[endDateTime, startDateTime]
|
||||
|
||||
Reference in New Issue
Block a user