fixed datetime parser
This commit is contained in:
parent
b06883dc3c
commit
17430a06a9
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,4 @@
|
||||
**/__pycache__/
|
||||
|
||||
.*
|
||||
!.gitignore
|
||||
|
1
.~lock.trump.csv#
Normal file
1
.~lock.trump.csv#
Normal file
@ -0,0 +1 @@
|
||||
,rugantio,alice,29.01.2019 22:19,file:///home/rugantio/.config/libreoffice/4;
|
Binary file not shown.
@ -74,9 +74,8 @@ def parse_date(date):
|
||||
if len(date) == 0:
|
||||
return 'Error: no data'
|
||||
|
||||
#no check for today
|
||||
#elif len(date) == 1 or date[1] == 'h':
|
||||
#pass
|
||||
elif len(date) == 2 and date[1] == 'h' and int(str(datetime.now().time()).split(sep=':')[0]) - int(date[0]) >= 0:
|
||||
pass
|
||||
|
||||
#yesterday
|
||||
elif date[0] == 'Ieri' or (date[1] == 'h' and int(str(datetime.now().time()).split(sep=':')[0]) - int(date[0]) < 0):
|
||||
|
Loading…
Reference in New Issue
Block a user