Skip to content

Commit

Permalink
mit/term: add 2024SP term, set it as current
Browse files Browse the repository at this point in the history
this is (probably?) my last term at mit

:smiling_face_with_tear:
  • Loading branch information
thatoddmailbox committed Feb 5, 2024
1 parent 83de93c commit e58b829
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion mit/term.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,23 @@ func GetTermByCode(code string) (TermInfo, error) {
LastDayOfClasses: time.Date(2023, 12, 13, 0, 0, 0, 0, time.UTC),
ExceptionDays: map[string]time.Weekday{},
}, nil
} else if code == "2024SP" {
return TermInfo{
Code: "2024SP",
FirstDayOfClasses: time.Date(2024, 2, 5, 0, 0, 0, 0, time.UTC),
LastDayOfClasses: time.Date(2024, 5, 14, 0, 0, 0, 0, time.UTC),
ExceptionDays: map[string]time.Weekday{
// Feb 20: Monday schedule of classes to be held.
"2024-02-20": time.Monday,
},
}, nil
}

return TermInfo{}, ErrBadTermCode
}

// GetCurrentTerm returns a TermInfo struct for the current academic term.
func GetCurrentTerm() TermInfo {
term, _ := GetTermByCode("2024FA")
term, _ := GetTermByCode("2024SP")
return term
}

0 comments on commit e58b829

Please sign in to comment.