feat: add documentation for ELSA and extend functionality, include new icons and update semester logic
This commit is contained in:
@@ -5,6 +5,7 @@ def generateSemesterByDate(next:bool = False):
|
||||
currentYear = datetime.datetime.now().year
|
||||
currentYear = int(str(currentYear)[-2:])
|
||||
month = datetime.datetime.now().month
|
||||
# month = month + 1
|
||||
if next:
|
||||
month += 1
|
||||
if month > 12:
|
||||
@@ -13,7 +14,7 @@ def generateSemesterByDate(next:bool = False):
|
||||
if month >= 4 and month <= 9:
|
||||
return "SoSe " + str(currentYear)
|
||||
else:
|
||||
if month == 10 or month == 11:
|
||||
if month == any([10, 11, 12]):
|
||||
return f"WiSe {currentYear}/{currentYear+1}"
|
||||
else:
|
||||
return f"WiSe {currentYear-1}/{currentYear}"
|
||||
@@ -38,4 +39,8 @@ def generateSemesterByOffset(offset):
|
||||
else:
|
||||
return f"WiSe {currentYear+1}/{currentYear+2}"
|
||||
else:
|
||||
return f"WiSe {currentYear+offset//2}/{currentYear+1+offset//2}"
|
||||
return f"WiSe {currentYear+offset//2}/{currentYear+1+offset//2}"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(generateSemesterByDate(next=True))
|
||||
Reference in New Issue
Block a user