mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
month buffer
This commit is contained in:
@@ -21,3 +21,11 @@ courses:
|
|||||||
name: 1405 old
|
name: 1405 old
|
||||||
- path: ./1405/2026_spring_alex
|
- path: ./1405/2026_spring_alex
|
||||||
name: "1405"
|
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"),
|
() => getDateFromStringOrThrow(settings.startDate, "course start date"),
|
||||||
[settings.startDate]
|
[settings.startDate]
|
||||||
);
|
);
|
||||||
const endDateTime = useMemo(
|
const endDateTime = useMemo(() => {
|
||||||
() => getDateFromStringOrThrow(settings.endDate, "course end date"),
|
const date = getDateFromStringOrThrow(settings.endDate, "course end date");
|
||||||
[settings.endDate]
|
date.setDate(date.getDate() + 14); // buffer to make sure calendar shows week of finals and grades due
|
||||||
);
|
return date;
|
||||||
|
}, [settings.endDate]);
|
||||||
const months = useMemo(
|
const months = useMemo(
|
||||||
() => getMonthsBetweenDates(startDateTime, endDateTime),
|
() => getMonthsBetweenDates(startDateTime, endDateTime),
|
||||||
[endDateTime, startDateTime]
|
[endDateTime, startDateTime]
|
||||||
|
|||||||
Reference in New Issue
Block a user