Middle of adding user to council member table. Need to move function for getting election name to utils.
build_develop / build (push) Successful in 1m33s

This commit is contained in:
2023-10-25 15:20:03 -04:00
parent ad58f3a9cb
commit 63e3b3edb2
3 changed files with 27 additions and 15 deletions
+14
View File
@@ -4,6 +4,8 @@ File contains util functions.
from datetime import datetime
from config import DakinyConfig
def get_datetime(day: str) -> datetime:
"""
@@ -24,3 +26,15 @@ def get_datetime(day: str) -> datetime:
year += 1
return datetime(year, month, day)
def get_election_cycle_name(config: DakinyConfig) -> str:
"""
Builds the unique name of the current election cycle
Returns:
str: the name of the election cycle
"""
# TODO finish
return f"vote-{election_start.year}-{election_cycle.name}"