mirror of
https://github.com/ultrasn0w/huso.git
synced 2025-12-14 06:49:52 +01:00
LastSeason
This commit is contained in:
16
knecht.go
16
knecht.go
@@ -274,3 +274,19 @@ func GetNextNextSeasonString() string {
|
||||
return fmt.Sprintf("%04d", now.Year())
|
||||
}
|
||||
}
|
||||
|
||||
func GetLastSeasonString() string {
|
||||
var now = time.Now()
|
||||
switch now.Month() {
|
||||
case time.January, time.February, time.March:
|
||||
return fmt.Sprintf("%04d/fall", now.Year()-1)
|
||||
case time.April, time.May, time.June:
|
||||
return fmt.Sprintf("%04d/winter", now.Year())
|
||||
case time.July, time.August, time.September:
|
||||
return fmt.Sprintf("%04d/spring", now.Year())
|
||||
case time.October, time.November, time.December:
|
||||
return fmt.Sprintf("%04d/summer", now.Year())
|
||||
default:
|
||||
return fmt.Sprintf("%04d", now.Year())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user