Hotfix Season.getSeasonStart
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2023-05-01 11:19:00 +02:00
Ursprung e8d964d833
Commit 4a6465953f

Datei anzeigen

@ -32,7 +32,14 @@ public class Season {
public static String getSeasonStart() {
Calendar calendar = Calendar.getInstance();
return calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) / 4 * 3 + 1) + "-1";
int month = calendar.get(Calendar.MONTH);
if (month <= 4) {
return calendar.get(Calendar.YEAR) + "-1-1";
} else if (month <= 8) {
return calendar.get(Calendar.YEAR) + "-5-1";
} else {
return calendar.get(Calendar.YEAR) + "-9-1";
}
}
public static String convertSeasonToString(int season){