Add vaccine stats (fixes #26), fix a few bugs in Corona, allow negative numbers to be displayed properly in corona, clean code up a bit, add daily difference for tests

This commit is contained in:
Stijn De Clercq 2021-01-20 00:55:32 +01:00
parent 2877def272
commit 5dd6b62a40
2 changed files with 121 additions and 16 deletions

View file

@ -142,3 +142,10 @@ def weekdayToInt(day):
def intToWeekday(day):
return ["Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag"][day]
def fromString(timeString: str, formatString="%d/%m/%Y"):
"""
Constructs a datetime object from an input string
"""
return datetime.datetime.strptime(timeString, formatString)