Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadTermCode = errors.New("mit: unknown term code")
ErrBadTermCode is reported when the given term code doesn't exist.
Functions ¶
This section is empty.
Types ¶
type ScheduledMeeting ¶
A ScheduledMeeting struct contains details about a scheduled meeting in a TimeInfo. Each TimeInfo can have multiple ScheduledMeetings.
func ParseScheduledMeeting ¶
func ParseScheduledMeeting(scheduledMeetingString string, termInfo TermInfo) (*ScheduledMeeting, *time.Time, *time.Time, error)
ParseScheduledMeeting parses the given time info string, in a format like "MW4-5.30"
type TermInfo ¶
type TermInfo struct { Code string FirstDayOfClasses time.Time LastDayOfClasses time.Time ExceptionDays map[string]time.Weekday }
A TermInfo struct contains information about an academic term.
func GetCurrentTerm ¶
func GetCurrentTerm() TermInfo
GetCurrentTerm returns a TermInfo struct for the current academic term.
func GetTermByCode ¶
GetTermByCode returns the TermInfo struct for the term with the given code, or ErrBadTermCode if the term couldn't be found.
Click to show internal directories.
Click to hide internal directories.