mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-07-18 18:48:48 +02:00
15 lines
309 B
Go
15 lines
309 B
Go
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"
|
|
}
|
|
}
|