Skip to content

Commit

Permalink
Removed unnecessary lines
Browse files Browse the repository at this point in the history
  • Loading branch information
SebiWrn committed Sep 21, 2024
1 parent 1c10aa5 commit 6d1c9b7
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions model/semester.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ func (s *Semester) InRangeOfSemesters(firstSemester Semester, lastSemester Semes
return s.Year == firstSemester.Year && s.TeachingTerm == firstSemester.TeachingTerm
}
return s.GreaterEqualThan(firstSemester) && lastSemester.GreaterEqualThan(*s)
/* Alternative:
return !(s.Year < firstSemester.Year || s.Year > lastSemester.Year ||
(s.Year == firstSemester.Year && s.TeachingTerm == "S" && firstSemester.TeachingTerm == "W") ||
(s.Year == lastSemester.Year && s.TeachingTerm == "W" && lastSemester.TeachingTerm == "S"))*/
}
if len(semesters) == 1 {
return s.Year == semesters[0].Year && s.TeachingTerm == semesters[0].TeachingTerm
}
for _, semester := range semesters {
if s.Year == semester.Year && s.TeachingTerm == semester.TeachingTerm {
Expand Down

0 comments on commit 6d1c9b7

Please sign in to comment.