update:#82 added schedule for sport update

This commit is contained in:
masterelmar
2023-12-13 10:03:37 +01:00
parent 4572541d65
commit cdbbe4bbf9
4 changed files with 29 additions and 2 deletions

View 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"
}
}