From 00b8cd74b6e817a62a2a1b4fcdeb68e67ec1cd65 Mon Sep 17 00:00:00 2001 From: Sriram Hariharan Date: Sat, 4 Mar 2023 21:11:04 -0600 Subject: [PATCH] added ExtensionRoot for consistent styling across injected components, and added a bunch of comments for all the added types and classes --- src/shared/types/CourseSchedule.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/shared/types/CourseSchedule.ts b/src/shared/types/CourseSchedule.ts index e141e08e..6ab6192e 100644 --- a/src/shared/types/CourseSchedule.ts +++ b/src/shared/types/CourseSchedule.ts @@ -48,6 +48,13 @@ export class CourseSchedule { Object.assign(this, courseSchedule); } + /** + * Given a string representation of a schedule, parse it into a CourseSchedule object + * @param dayLine a string representation of the days of the week that the course is taught: MWF, TR, etc. + * @param timeLine a string representation of a time-range that the course is taught: 10:00 am - 11:00 am, 1:00 pm - 2:00 pm, etc. + * @param roomLine a string representation of the room that the course is taught in: JGB 2.302, etc. + * @returns an array of CourseMeeting objects, which represent the schedule for the course + */ static parse(dayLine: string, timeLine: string, roomLine: string): CourseMeeting[] { try { let days: Day[] = dayLine