mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 15:48:29 +02:00
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:
parent
2877def272
commit
5dd6b62a40
2 changed files with 121 additions and 16 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue