From 8fe0b3ce53e840a2ea6ae2370bb96d3c5c9ed320 Mon Sep 17 00:00:00 2001 From: Nicholas Novak <34256932+NickyBoy89@users.noreply.github.com> Date: Thu, 18 Jan 2024 16:39:12 -0800 Subject: [PATCH] feat: Added the ability to skip times that are not present --- schedule.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/schedule.go b/schedule.go index 6dcfe06..c010fcc 100644 --- a/schedule.go +++ b/schedule.go @@ -35,6 +35,11 @@ func (s Schedule) CurrentCourse() (string, error) { } for courseName, courseInfo := range s.Courses { + // Skip times that are TBD + if courseInfo.StartTime == "TBD" || courseInfo.EndTime == "TBD" { + continue + } + startTime, err := time.Parse(time.Kitchen, courseInfo.StartTime) if err != nil { return "", err