mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-08-07 04:09:17 +02:00
special case: merge two semesters at end of semester
This commit is contained in:
@@ -45,6 +45,11 @@ func GetSemesterStart(date time.Time) time.Time {
|
||||
}
|
||||
}
|
||||
|
||||
// Check if is in last month of semester
|
||||
func IsLastMonthOfSemester(date time.Time) bool {
|
||||
return date.Month() == START_OF_WINTER_SEMESTER_MONTH-1 || date.Month() == START_OF_SUMMER_SEMESTER_MONTH-1
|
||||
}
|
||||
|
||||
// Check if the given date is before the start of summer semester
|
||||
func isBeforeSummerSemester(date time.Time) bool {
|
||||
return date.Month() < START_OF_SUMMER_SEMESTER_MONTH
|
||||
|
Reference in New Issue
Block a user