mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-07-24 21:39:14 +02:00
update:#82 added schedule for sport update
This commit is contained in:
14
backend/service/functions/semester.go
Normal file
14
backend/service/functions/semester.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package functions
|
||||
|
||||
import "time"
|
||||
|
||||
// GetCurrentSemesterString returns the current semester as string
|
||||
// if current month is between 10 and 03 -> winter semester "ws"
|
||||
func GetCurrentSemesterString() string {
|
||||
|
||||
if time.Now().Month() >= 10 || time.Now().Month() <= 3 {
|
||||
return "ws"
|
||||
} else {
|
||||
return "ss"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user